mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-04 13:57:44 +00:00
add timeout msg to client
This commit is contained in:
parent
e1bbff7a93
commit
d08e11e17e
1 changed files with 2 additions and 0 deletions
|
|
@ -97,6 +97,8 @@ class TCPClient:
|
|||
received = str(self._sock.recv(1024), "utf-8")
|
||||
logging.debug("received: " + received)
|
||||
return received
|
||||
except socket.timeout:
|
||||
logging.warning("cannot receive - timeout after %s sec", self._timeout)
|
||||
except AttributeError:
|
||||
logging.error("cannot receive - no connection established")
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue