Ignore if socket is blocking
This commit is contained in:
parent
000a00fec8
commit
0df5286c0e
@ -55,8 +55,11 @@ class Connection:
|
||||
if select.select([self._socket], [], []) != ([], [], []):
|
||||
# wait for data availiable
|
||||
while True:
|
||||
try:
|
||||
# fill buffer with one message
|
||||
data = self._socket.recv(1024)
|
||||
except BlockingIOError:
|
||||
continue
|
||||
|
||||
if not data:
|
||||
# buffer is empty
|
||||
|
Loading…
Reference in New Issue
Block a user