shutdown when ping timeout
This commit is contained in:
parent
4d92a39cc4
commit
2344c185fe
1 changed files with 1 additions and 0 deletions
|
@ -41,6 +41,7 @@ def pinger(nick, connection):
|
||||||
property_list[nick]["ping_pending"] = True
|
property_list[nick]["ping_pending"] = True
|
||||||
elif property_list[nick]["ping_pending"] and ((time.time() - property_list[nick]["last_ping"]) > 120):
|
elif property_list[nick]["ping_pending"] and ((time.time() - property_list[nick]["last_ping"]) > 120):
|
||||||
property_list[nick]["cause"] = "Ping timeout: 120 seconds"
|
property_list[nick]["cause"] = "Ping timeout: 120 seconds"
|
||||||
|
connection.shutdown(socket.SHUT_WR)
|
||||||
connection.close()
|
connection.close()
|
||||||
break
|
break
|
||||||
def session(connection, client):
|
def session(connection, client):
|
||||||
|
|
Loading…
Reference in a new issue