Exit the loop if the client wants to disconnect; fixes #30
This commit is contained in:
parent
1506e22458
commit
5ccb32f338
6 changed files with 46 additions and 7 deletions
|
|
@ -22,8 +22,11 @@ class _AbstractTransport(object):
|
|||
def __init__(self):
|
||||
self._packet_id = 0
|
||||
self._callback_by_packet_id = {}
|
||||
self._wants_to_disconnect = False
|
||||
|
||||
def disconnect(self, path=''):
|
||||
if not path:
|
||||
self._wants_to_disconnect = True
|
||||
if not self.connected:
|
||||
return
|
||||
if path:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue