fixed a crash caused by trying to remove a fileno that's not in IRCBot's epoll object.

This commit is contained in:
jesopo 2016-07-14 09:17:41 +01:00
parent 7425afa90f
commit b18a503b01
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -90,7 +90,10 @@ class Bot(object):
)-server.last_read
def disconnect(self, server):
self.poll.unregister(server.fileno())
try:
self.poll.unregister(server.fileno())
except FileNotFoundError:
pass
del self.servers[server.fileno()]
def reconnect(self, event):