Check for socket before attempting to close - related to bug at ekulyk/PythonPusherClient#14

This commit is contained in:
Erik Kulyk
2014-10-12 16:49:52 -06:00
parent 322687e987
commit 0afc6dda3c

View File

@@ -831,6 +831,7 @@ class WebSocket(object):
self._closeInternal()
def _closeInternal(self):
if self.sock:
self.sock.close()
def _send(self, data):