qpid-proton
qpid-proton copied to clipboard
NO-JIRA: [Python] IO: Add ENETUNREACH to the list of tolerated errors
...which will enable reconnection logic to act in this case.
ENETUNREACH
can happen when target network is unreachable for example
when the network stack was not fully initialized yet or when a network
is not connected temporarily, etc.
This makes ENETUNREACH
handled just like EHOSTUNREACH
(which is for some reason indicated with EINPROGRESS
in this part of the code).
Codecov Report
Merging #365 (bb27336) into main (a920192) will increase coverage by
20.11%
. The diff coverage isn/a
.
:exclamation: Current head bb27336 differs from pull request most recent head ba58d8c. Consider uploading reports for the commit ba58d8c to get more accurate results
@@ Coverage Diff @@
## main #365 +/- ##
===========================================
+ Coverage 68.24% 88.36% +20.11%
===========================================
Files 367 47 -320
Lines 73285 2397 -70888
===========================================
- Hits 50011 2118 -47893
+ Misses 23274 279 -22995
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a920192...ba58d8c. Read the comment docs.
Thanks for looking at and debugging the issue you found. I'm pretty sure this isn't the correct place for the fix (even if it was the easiest place to fix your issue).
In future it really helps us to raise an issue connected with fixes for tracking purposes also to understand the environment of the issue - was this under Windows/MacOS or Linux for example as the errno behaviour can vary between the platforms. Certainly your comment about EHOSTUNREACH is not true for Linux, and that seems to me to be a much more important connect failure case than ENETUNREACH.
Sure, thanks for the feedback! Should I open an issue (at this point)? This was on Linux. I am pretty sure that it behaves like I've described it, which is indeed unexpected...
Sure, thanks for the feedback! Should I open an issue (at this point)?
I think this deserves an issue - although there may already be an issue about reconnect not correctly working if the failure is the initial connect operation.
This was on Linux. I am pretty sure that it behaves like I've described it, which is indeed unexpected...
It could well be that in the case of EHOSTUNREACH this doesn't get discovered immediately which makes it EINPROGRESS, but eventually fails when the target router sends back the unreachable ICMP packet.
Opened PROTON-2528.