Fix #46
This commit is contained in:
parent
d0ba033ac3
commit
66c11a0a37
1 changed files with 7 additions and 8 deletions
|
|
@ -286,14 +286,13 @@ class SocketIO(object):
|
|||
self.wait(seconds, for_callbacks=True)
|
||||
|
||||
def disconnect(self, path=''):
|
||||
if self.connected:
|
||||
self._transport.disconnect(path)
|
||||
try:
|
||||
namespace = self._namespace_by_path[path]
|
||||
namespace.on_disconnect()
|
||||
except KeyError:
|
||||
pass
|
||||
del self._namespace_by_path[path]
|
||||
self._transport.disconnect(path)
|
||||
try:
|
||||
namespace = self._namespace_by_path[path]
|
||||
namespace.on_disconnect()
|
||||
del self._namespace_by_path[path]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
@property
|
||||
def connected(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue