Skip to content

Commit

Permalink
set ready event after startup
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Apr 5, 2017
1 parent 5457f4c commit 52530c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion m2mclient/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import unicode_literals

VERSION = "0.1.6a2"
VERSION = "0.1.6a3"
3 changes: 2 additions & 1 deletion m2mclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def run(self):
self.error = event.reason
elif event.name == 'ready':
self.running = True
self.ready_event.set()
self.on_startup()
self.ready_event.set()
elif event.name == 'binary':
self.on_binary(event.data)
finally:
Expand All @@ -56,6 +56,7 @@ def run(self):
def on_binary(self, data):
"""Called with a binary message."""
if not self.client:
log.warning('ws message %r ignored', data)
return
try:
packet = M2MPacket.from_bytes(data)
Expand Down

0 comments on commit 52530c9

Please sign in to comment.