Catch AttributeError in client connected check

If the client has never connected, there will be no __transport attribute.
This commit is contained in:
Marcus Cobden 2013-12-23 13:46:37 +00:00
commit fa454b5950

View file

@ -222,7 +222,12 @@ class SocketIO(object):
@property
def connected(self):
return self.__transport.connected
try:
transport = self.__transport
except AttributeError:
return False
else:
return transport.connected
@property
def _transport(self):