diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2003-12-11 18:39:40 +0000 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2011-08-21 15:53:50 +0200 |
commit | 019f63596cdb62af7959f24d6c542a8d57081113 (patch) | |
tree | 9e783c40209c2daf3b62ec94911a0d3657e84416 | |
parent | 926e33090efc8538a6fe1a92b4d0283bc7f7c19b (diff) | |
download | miniircd-019f63596cdb62af7959f24d6c542a8d57081113.tar.gz miniircd-019f63596cdb62af7959f24d6c542a8d57081113.zip |
Don't send PING in the registration phase, just disconnect
-rwxr-xr-x | miniircd | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -129,8 +129,13 @@ class Client(object): self.disconnect("ping timeout") return if not self.__sentPing and self.timestamp + 90 < now: - self.message("PING :%s" % self.__server.name) - self.__sentPing = True + if self.__handleCommand == self.__commandHandler: + # Registered. + self.message("PING :%s" % self.__server.name) + self.__sentPing = True + else: + # Not registered. + self.disconnect("ping timeout") def writeQueueSize(self): return len(self.__writebuffer) |