Cache a server fileno from connect onwards, like we used to

This commit is contained in:
jesopo 2018-11-05 20:33:30 +00:00
parent e2c806ffe4
commit 3cb9baeec3

View file

@ -96,6 +96,7 @@ class Server(IRCObject.Object):
self.socket.connect((self.connection_params.hostname,
self.connection_params.port))
self.cached_fileno = self.socket.fileno()
self.send_capibility_ls()
if self.connection_params.password:
@ -109,7 +110,6 @@ class Server(IRCObject.Object):
self.send_nick(nickname)
self.connected = True
def disconnect(self):
self.cached_fileno = self.socket.fileno()
self.connected = False
try:
self.socket.shutdown(socket.SHUT_RDWR)