Closed Marco-Sulla closed 8 years ago
Sounds to me this is intended -- once you get an error the connection is busted and there's nothing you can do about it anyway (given that this code is used only for TCP, not for UDP).
EINTR (InterruptedError) is managed, I don't know if you can manage EHOSTUNREACH similarly. Yes, the protocol is TCP.
EDIT: probably not. I searched a little and also node.js does not manage EHOSTUNREACH by default. Sorry for bothering.
EINTR happens when a signal interrupts a call, meaning that the call should be tried again after the interruption is handled. This error is independent of what the syscall does and is not fatal. AFAIK, with Python 3.5 and later, this exception is not raised anymore and handled at a lower level. EHOSTUNREACH is a fatal error related to the network operation you are trying to do, which will never be able to complete. Unfortunately, there is nothing else that can be done here.
2016-07-20 15:12 GMT+02:00 MarcoSulla notifications@github.com:
EINTR is managed, I don't know if you can manage EHOSTUNREACH similarly. Yes, the protocol is TCP.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/python/asyncio/issues/380#issuecomment-233944426, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL7GDDcAHHv9xULkJ_vxLEypT4zSNu9ks5qXh64gaJpZM4JP0oU .
Martin http://www.martiusweb.net Richard www.martiusweb.net
In
asyncio/selector_events.py
:errno.EHOSTUNREACH
is uncatched._fatal_error
does not manage it too, and forces theloopconnection to close.Is this intended? This causes my aiohttp server to shutdown on a network problem.