Log less precise time for connection cleanup
This commit is contained in:
parent
083d64d151
commit
d89d770e73
1 changed files with 2 additions and 2 deletions
|
@ -231,11 +231,11 @@ class ConnectionServer(object):
|
|||
connection.unpacker = None
|
||||
|
||||
elif connection.last_cmd_sent == "announce" and idle > 20: # Bootstrapper connection close after 20 sec
|
||||
connection.close("[Cleanup] Tracker connection: %s" % idle)
|
||||
connection.close("[Cleanup] Tracker connection, idle: %.3fs" % idle)
|
||||
|
||||
if idle > 60 * 60:
|
||||
# Wake up after 1h
|
||||
connection.close("[Cleanup] After wakeup, idle: %s" % idle)
|
||||
connection.close("[Cleanup] After wakeup, idle: %.3fs" % idle)
|
||||
|
||||
elif idle > 20 * 60 and connection.last_send_time < time.time() - 10:
|
||||
# Idle more than 20 min and we have not sent request in last 10 sec
|
||||
|
|
Loading…
Reference in a new issue