Closed enkiusz closed 7 months ago
+1 to this because ConnectionError
is causing the client to be unusable in Python 2.7.
Hello and thanks for your patience.
I'm not sure what issue we want to solve. It seems we should never get any TimeoutError since the socket is set to setblocking(0). So I guess we receive BlockingIOError instead of a possible TimeoutError ?
In case of Timeout, shouldn't we prefer the handling done in BlockingIOError: retry later rather that disconnect ?
Closing this PR, since #797 which fixed another issue (SSL error not being catched) seems to result in very similar fixed.
If there is some case not covered by #797 feel free to re-open the PR and explaining what issue you solve this your PR.
Upgrade ConnectionError to OSError to catch more TCP failures (for example timeouts). Minor exception handling cleanups.