There was an error while loading. Please reload this page.
1 parent 1b6d1bc commit 5c55039Copy full SHA for 5c55039
DataSocket/TCPDataSocket.py
@@ -428,17 +428,17 @@ def _receive_data_raw(self):
428
total_received += nbytes
429
raise BlockingIOError
430
except Exception as e:
431
- if isinstance(e, error):
432
- self.is_connected = False
433
- nbytes=0
434
- break
435
- elif isinstance(e, BlockingIOError):
+ if isinstance(e, BlockingIOError):
436
if nbytes > 0 and nbytes % self.max_tcp_packet_size != 0:
437
raise e
438
elif nbytes == 0:
439
continue
440
else:
441
+ elif isinstance(e, error):
+ self.is_connected = False
+ nbytes=0
+ break
442
443
444
if nbytes == 0:
0 commit comments