mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-05 06:15:31 +00:00
fix errors
This commit is contained in:
parent
096d6fefe3
commit
50095bf4a7
2 changed files with 11 additions and 6 deletions
|
|
@ -105,7 +105,12 @@ class TCPClient:
|
|||
@property
|
||||
def isConnected(self):
|
||||
"""!Property of client connected state"""
|
||||
_, write, _ = select.select([], [self._sock], [], 0.1)
|
||||
if write:
|
||||
return True
|
||||
return False
|
||||
try:
|
||||
if self._sock:
|
||||
read, write, _ = select.select([], [self._sock], [], 0.1)
|
||||
if read and write:
|
||||
return True
|
||||
return False
|
||||
except:
|
||||
logging.exception("cannot check connection status")
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue