diff --git a/src/Connection/ConnectionServer.py b/src/Connection/ConnectionServer.py index f9d9c9da..ee42aba7 100644 --- a/src/Connection/ConnectionServer.py +++ b/src/Connection/ConnectionServer.py @@ -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(