Exit the loop if the client wants to disconnect; fixes #30

This commit is contained in:
Roy Hyunjin Han 2013-11-18 10:43:31 -08:00
commit 5ccb32f338
6 changed files with 46 additions and 7 deletions

View file

@ -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: