Add a connected state for socket

This commit is contained in:
nemunaire 2014-10-01 00:33:52 +02:00
commit 302add96ca
2 changed files with 8 additions and 4 deletions

View file

@ -197,7 +197,7 @@ class IRCServer(SocketServer):
return False
def _close(self):
if self.socket is not None: self.write("QUIT")
if self.connected: self.write("QUIT")
return SocketServer._close(self)
def read(self):