mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
Irc: lower ping frequency & timeout to 90/180
180*3 seconds is equivalent to 9 minutes. That's a long time for a dead network to stay connected.
This commit is contained in:
parent
6060a8857f
commit
4c00479d78
@ -47,8 +47,8 @@ class Irc():
|
||||
self.bot_clients = {}
|
||||
self.protoname = proto.__name__
|
||||
self.proto = proto.Class(self)
|
||||
self.pingfreq = self.serverdata.get('pingfreq') or 180
|
||||
self.pingtimeout = self.pingfreq * 3
|
||||
self.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||
self.pingtimeout = self.pingfreq * 2
|
||||
|
||||
self.connected = threading.Event()
|
||||
self.aborted = threading.Event()
|
||||
@ -98,7 +98,7 @@ class Irc():
|
||||
"""
|
||||
self.sid = self.serverdata["sid"]
|
||||
self.botdata = self.conf['bot']
|
||||
self.pingfreq = self.serverdata.get('pingfreq') or 180
|
||||
self.pingfreq = self.serverdata.get('pingfreq') or 90
|
||||
self.pingtimeout = self.pingfreq * 3
|
||||
|
||||
self.connected.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user