Fix python3 ReferenceError

This commit is contained in:
Roy Hyunjin Han 2015-02-16 14:23:46 -05:00
commit 6627e360d7
2 changed files with 6 additions and 1 deletions

View file

@ -289,7 +289,10 @@ class SocketIO(object):
self.wait(seconds, for_callbacks=True)
def disconnect(self, path=''):
self._transport.disconnect(path)
try:
self._transport.disconnect(path)
except ReferenceError:
pass
try:
namespace = self._namespace_by_path[path]
namespace.on_disconnect()