Skip to content

Commit

Permalink
Fix copter id getter
Browse files Browse the repository at this point in the history
  • Loading branch information
artem30801 committed Apr 9, 2019
1 parent db04cc7 commit b900820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ def connect(self, client_selector, client_socket, client_addr):
if self.on_connect:
self.on_connect(self)

def _got_id(self):
def _got_id(self, value):
logging.info("Got copter id: {} for client {}".format(self.copter_id, self.addr))
self.copter_id = value
if Client.on_first_connect:
Client.on_first_connect(self)

Expand Down
2 changes: 1 addition & 1 deletion messaging_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self):
self._request_lock = threading.Lock()

self.BUFFER_SIZE = 1024
self.resume_queue = True
self.resume_queue = False

def _set_selector_events_mask(self, mode):
"""Set selector to listen for events: mode is 'r', 'w', 'rw'."""
Expand Down

0 comments on commit b900820

Please sign in to comment.