Merge pull request #37 from leth/patch-3
Catch AttributeError in client connected check
This commit is contained in:
commit
c1e4924717
1 changed files with 6 additions and 1 deletions
|
|
@ -243,7 +243,12 @@ class SocketIO(object):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def connected(self):
|
def connected(self):
|
||||||
return self.__transport.connected
|
try:
|
||||||
|
transport = self.__transport
|
||||||
|
except AttributeError:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return transport.connected
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _transport(self):
|
def _transport(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue