3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-03 08:04:07 +01:00

IRCS2SProtocol: ignore attempts to ping the uplink before the link is ready

This commit is contained in:
James Lu 2017-07-06 21:45:51 -07:00
parent d149576b4e
commit 6d3d2b239d

View File

@ -403,7 +403,7 @@ class IRCS2SProtocol(IRCCommonProtocol):
"""Sends a PING to the uplink. """Sends a PING to the uplink.
This is mostly used by PyLink internals to check whether the remote link is up.""" This is mostly used by PyLink internals to check whether the remote link is up."""
if self.sid: if self.sid and self.connected.is_set():
self._send_with_prefix(self.sid, 'PING %s' % self._expandPUID(self.sid)) self._send_with_prefix(self.sid, 'PING %s' % self._expandPUID(self.sid))
def quit(self, numeric, reason): def quit(self, numeric, reason):