epoll: Ignore socket.errors on _epoll.unregister

This commit is contained in:
Ask Solem 2011-01-26 13:03:44 +01:00
parent 5d4110190d
commit 936ea9f5f1
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ class _epoll(object):
self._epoll.register(fd, events) self._epoll.register(fd, events)
def unregister(self, fd): def unregister(self, fd):
try:
self._epoll.unregister(fd) self._epoll.unregister(fd)
except socket.error:
pass
def poll(self, timeout): def poll(self, timeout):
return self._epoll.poll(timeout / 1000.0) return self._epoll.poll(timeout / 1000.0)