Update server.py
This commit is contained in:
parent
378d071c32
commit
f67203ceb2
1 changed files with 1 additions and 1 deletions
|
@ -38,8 +38,8 @@ def pinger(nick, connection):
|
|||
print(property_list[nick]["ping_pending"] == True)
|
||||
if (time.time() - property_list[nick]["last_ping"]) > 60 and not property_list[nick]["ping_pending"]:
|
||||
print("Sent ping message to " + nick)
|
||||
connection.sendall(bytes(f"PING {server}\r\n","UTF-8"))
|
||||
property_list[nick]["ping_pending"] = True
|
||||
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"
|
||||
connection.shutdown(socket.SHUT_WR)
|
||||
|
|
Loading…
Reference in a new issue