Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support older versions of tornado #82

Merged
merged 4 commits into from
Aug 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rm trycatch unnecessary
  • Loading branch information
dheera committed Aug 15, 2021
commit 3b39da242fe96da0a1e04a32a66043bf6ce11dee
11 changes: 4 additions & 7 deletions rosboard/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ def open(self):

# polyfill of is_closing() method for older versions of tornado
if not hasattr(self.ws_connection, "is_closing"):
try:
self.ws_connection.is_closing = types.MethodType(
lambda self_: self_.stream.closed() or self_.client_terminated or self_.server_terminated,
self.ws_connection
)
except:
traceback.print_exc()
self.ws_connection.is_closing = types.MethodType(
lambda self_: self_.stream.closed() or self_.client_terminated or self_.server_terminated,
self.ws_connection
)

self.update_intervals_by_topic = {} # this socket's throttle rate on each topic
self.last_data_times_by_topic = {} # last time this socket received data on each topic
Expand Down