mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-28 13:42:37 +01:00
selectdriver: don't try to deregister dead sockets
This commit is contained in:
parent
ab70d7c8fb
commit
fb6c3bf6d5
@ -33,8 +33,11 @@ def unregister(irc):
|
||||
"""
|
||||
Removes a network from the global selectors instance.
|
||||
"""
|
||||
log.debug('selectdriver: de-registering %s for network %s', irc._socket, irc.name)
|
||||
selector.unregister(irc._socket)
|
||||
if irc._socket.fileno() != -1:
|
||||
log.debug('selectdriver: de-registering %s for network %s', irc._socket, irc.name)
|
||||
selector.unregister(irc._socket)
|
||||
else:
|
||||
log.debug('selectdriver: skipping de-registering %s for network %s', irc._socket, irc.name)
|
||||
|
||||
def start():
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user