Commit 43fdd059 authored by Julien Muchembled's avatar Julien Muchembled

Fix potential EMFILE when retrying to connect indefinitely

parent 6f86c773
......@@ -135,6 +135,11 @@ class EpollEventManager(object):
self._closeAppend(connector.shutdown())
if self._closeAcquire(0):
self._closeRelease()
return
if close:
# The connection is not registered, so do not wait for epoll
# to wake up (which may not even happen, and lead to EMFILE).
connector.shutdown()()
def isIdle(self):
return not (self._pending_processing or self.writer_set)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment