diff --git a/README.md b/README.md index b587fb8..ef3b3ed 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/socketIO_client/__init__.py b/socketIO_client/__init__.py index 3624484..f06b5cb 100644 --- a/socketIO_client/__init__.py +++ b/socketIO_client/__init__.py @@ -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()