diff options
Diffstat (limited to 'serial/urlhandler/protocol_socket.py')
-rw-r--r-- | serial/urlhandler/protocol_socket.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py index 36cdf1f..11f6a05 100644 --- a/serial/urlhandler/protocol_socket.py +++ b/serial/urlhandler/protocol_socket.py @@ -249,7 +249,8 @@ class Serial(SerialBase): while ready: ready, _, _ = select.select([self._socket], [], [], 0) try: - self._socket.recv(4096) + if ready: + ready = self._socket.recv(4096) except OSError as e: # this is for Python 3.x where select.error is a subclass of # OSError ignore BlockingIOErrors and EINTR. other errors are shown |