Fix python3 ReferenceError
This commit is contained in:
parent
97b3325d6f
commit
6627e360d7
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
[](https://travis-ci.org/invisibleroads/socketIO-client)
|
||||||
|
|
||||||
socketIO-client
|
socketIO-client
|
||||||
===============
|
===============
|
||||||
Here is a [socket.io](http://socket.io) client library for Python. You can use it to write test code for your socket.io server.
|
Here is a [socket.io](http://socket.io) client library for Python. You can use it to write test code for your socket.io server.
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,10 @@ class SocketIO(object):
|
||||||
self.wait(seconds, for_callbacks=True)
|
self.wait(seconds, for_callbacks=True)
|
||||||
|
|
||||||
def disconnect(self, path=''):
|
def disconnect(self, path=''):
|
||||||
self._transport.disconnect(path)
|
try:
|
||||||
|
self._transport.disconnect(path)
|
||||||
|
except ReferenceError:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
namespace = self._namespace_by_path[path]
|
namespace = self._namespace_by_path[path]
|
||||||
namespace.on_disconnect()
|
namespace.on_disconnect()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue