You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2022/04/07 14:35:16 UTC

[GitHub] [qpid-proton] astitcher commented on a diff in pull request #365: NO-JIRA: [Python] IO: Add ENETUNREACH to the list of tolerated errors

astitcher commented on code in PR #365:
URL: https://github.com/apache/qpid-proton/pull/365#discussion_r845202392


##########
python/proton/_io.py:
##########
@@ -65,7 +65,7 @@ def connect(addr) -> socket.socket:
         try:
             s.connect(addr[4])
         except socket.error as e:
-            if e.errno not in (errno.EINPROGRESS, errno.EWOULDBLOCK, errno.EAGAIN):
+            if e.errno not in (errno.EINPROGRESS, errno.EWOULDBLOCK, errno.EAGAIN, errno.ENETUNREACH):

Review Comment:
   I'm pretty sure this change doesn't make sense at this point in the code:
   The very low level connect is only making sure that a connect on a nonblocking socket worked - the only "non errors" on a non blocking socket are the ones listed - they indicate that the operation is in progress.
   ENETUNREACH indicates that the connect operation failed (at this low level). Any retries because of this kind of failure need to be handled at a higher level.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org