From 936ea9f5f1a0316713a69061cb9dd75e4c350d6f Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Wed, 26 Jan 2011 13:03:44 +0100 Subject: [PATCH] epoll: Ignore socket.errors on _epoll.unregister --- kombu/utils/eventio.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kombu/utils/eventio.py b/kombu/utils/eventio.py index 34917318..6a0bcb6a 100644 --- a/kombu/utils/eventio.py +++ b/kombu/utils/eventio.py @@ -19,7 +19,10 @@ class _epoll(object): self._epoll.register(fd, events) def unregister(self, fd): - self._epoll.unregister(fd) + try: + self._epoll.unregister(fd) + except socket.error: + pass def poll(self, timeout): return self._epoll.poll(timeout / 1000.0)