Update server.py
This commit is contained in:
parent
afa7a26bf2
commit
c8d2b34339
1 changed files with 2 additions and 2 deletions
|
@ -77,8 +77,8 @@ def pinger(nick, connection):
|
|||
property_list[nick]["ping_pending"] = True
|
||||
time.sleep(0.5)
|
||||
connection.sendall(bytes(f"PING {server}\r\n","UTF-8"))
|
||||
elif property_list[nick]["ping_pending"] and ((time.time() - property_list[nick]["last_ping"]) > 120):
|
||||
property_list[nick]["cause"] = "Ping timeout: 120 seconds"
|
||||
elif property_list[nick]["ping_pending"] and ((time.time() - property_list[nick]["last_ping"]) > 255):
|
||||
property_list[nick]["cause"] = "Ping timeout: 255 seconds"
|
||||
connection.shutdown(socket.SHUT_WR)
|
||||
connection.close()
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue