fixed a crash caused by trying to remove a fileno that's not in IRCBot's epoll object.
This commit is contained in:
parent
7425afa90f
commit
b18a503b01
1 changed files with 4 additions and 1 deletions
|
@ -90,7 +90,10 @@ class Bot(object):
|
|||
)-server.last_read
|
||||
|
||||
def disconnect(self, server):
|
||||
try:
|
||||
self.poll.unregister(server.fileno())
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
del self.servers[server.fileno()]
|
||||
|
||||
def reconnect(self, event):
|
||||
|
|
Loading…
Reference in a new issue