Increase command timeout

This commit is contained in:
shortcutme 2017-02-27 00:05:27 +01:00
parent c5c41f2d3e
commit 06ddf26d09
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 4 additions and 3 deletions

View File

@ -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(