3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 19:19:31 +01:00

Move some IRC-specific attributes to IRCNetwork

This commit is contained in:
James Lu 2017-06-27 15:58:38 -07:00
parent fb34392fca
commit c3cdf63253

View File

@ -74,14 +74,10 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
self.pingfreq = self.serverdata.get('pingfreq') or 90
self.pingtimeout = self.pingfreq * 2
self.queue = None
self.connected = threading.Event()
self.aborted = threading.Event()
self.reply_lock = threading.RLock()
self.pingTimer = None
# Sets the multiplier for autoconnect delay (grows with time).
self.autoconnect_active_multiplier = 1
@ -1130,6 +1126,13 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
_getUid = _get_UID
class IRCNetwork(PyLinkNetworkCoreWithUtils):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.connection_thread = None
self.queue = None
self.pingTimer = None
def _schedule_ping(self):
"""Schedules periodic pings in a loop."""
self.ping()