Increase command timeout
This commit is contained in:
parent
c5c41f2d3e
commit
06ddf26d09
1 changed files with 4 additions and 3 deletions
|
@ -195,15 +195,16 @@ class ConnectionServer:
|
|||
# Incomplete data with more than 10 sec idle
|
||||
connection.close("[Cleanup] Connection buff stalled")
|
||||
|
||||
elif idle > 10 and connection.waiting_requests and time.time() - connection.last_send_time > 10:
|
||||
elif idle > 10 and connection.waiting_requests and time.time() - connection.last_send_time > 20:
|
||||
# Sent command and no response in 10 sec
|
||||
connection.close(
|
||||
"[Cleanup] Command %s timeout: %.3fs" % (connection.last_cmd, time.time() - connection.last_send_time)
|
||||
)
|
||||
|
||||
connection.log("[Cleanup] Connect timeout: %s" % idle)
|
||||
connection.close()
|
||||
elif idle > 30 and connection.protocol == "?": # No connection after 30 sec
|
||||
connection.close(
|
||||
"[Cleanup] Connect timeout: %.3fs" % idle
|
||||
)
|
||||
|
||||
elif idle < 60 and connection.bad_actions > 40:
|
||||
connection.close(
|
||||
|
|
Loading…
Reference in a new issue