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

@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/invisibleroads/socketIO-client.svg?branch=master)](https://travis-ci.org/invisibleroads/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.

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()