fishy commented on a change in pull request #2200:
URL: https://github.com/apache/thrift/pull/2200#discussion_r464653402



##########
File path: lib/py/src/transport/TSocket.py
##########
@@ -91,12 +91,13 @@ def isOpen(self):
             try:
                 peeked_bytes = self.handle.recv(1, socket.MSG_PEEK)
             except (socket.error, OSError) as exc:  # on modern python this is 
just BlockingIOError
-                if exc.errno == errno.EWOULDBLOCK:
+                if exc.errno in (errno.EWOULDBLOCK, errno.EAGAIN):

Review comment:
       Looks like this would be fine:
   ```
   >>> foo = 1
   >>> foo in (1, 1, 2, 3)
   True
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to