Skip to content

Commit

Permalink
OAI-29: Improved connection check method
Browse files Browse the repository at this point in the history
  • Loading branch information
dborowiecki committed Jan 21, 2021
1 parent 395cf26 commit c9d3200
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/websocket/abstract_websocket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def is_open(self):
:return: True if connection is opened.
"""
return self.websocket is not None
if not self.websocket:
return False
else:
sock = self.websocket.sock
return sock and sock.connected

def add_action_on_receive(self, on_receive_func: Callable[[object], None]):
"""
Expand Down

0 comments on commit c9d3200

Please sign in to comment.