Make the ping thread daemonized to allow the bot to quit

This commit is contained in:
nyuszika7h 2017-01-19 21:22:59 +01:00
parent 2354269ed2
commit 1c5761ce26

View File

@ -103,7 +103,10 @@ def connect_callback(cli):
if var.SERVER_PING_INTERVAL > 0:
def ping_server_timer(cli):
ping_server(cli)
threading.Timer(var.SERVER_PING_INTERVAL, ping_server_timer, args=(cli,)).start()
t = threading.Timer(var.SERVER_PING_INTERVAL, ping_server_timer, args=(cli,))
t.daemon = True
t.start()
ping_server_timer(cli)