Skip to content

Commit

Permalink
Finish feature/OAI-29
Browse files Browse the repository at this point in the history
OAI-29: Improved connection check method
  • Loading branch information
dragos-dobre authored Jan 21, 2021
2 parents 36b0a0a + c9d3200 commit 9ffa631
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 9ffa631

Please sign in to comment.