STINNER Victor added the comment: Instead of just catching EAGAIN, you can catch BlockingIOError. In Python 2.7, it means catching: (EAGAIN, EALREADY, EINPROGRESS, EWOULDBLOCK) errors.
I made a similar change in asyncore recently: --- changeset: 91833:d422062d7d36 branch: 2.7 parent: 91830:841cdb6145e9 user: Victor Stinner <victor.stin...@gmail.com> date: Thu Jul 24 19:15:00 2014 +0200 files: Doc/library/asyncore.rst Lib/asynchat.py Lib/test/test_asynchat.py Misc/NEWS description: Issue #16133: The asynchat.async_chat.handle_read() method now ignores socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY, EINPROGRESS, or EWOULDBLOCK. Initial patch written by Xavier de Gaye. --- This issue is another reason to not use eventlet with monkey-patching :-) It's time to switch to asyncio (trollius for Python 2)! ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22114> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com