mirror of
https://git.clerie.de/clerie/mitel_ommclient2.git
synced 2026-01-03 04:38:12 +00:00
Ignore if socket is blocking
This commit is contained in:
parent
000a00fec8
commit
0df5286c0e
1 changed files with 5 additions and 2 deletions
|
|
@ -55,8 +55,11 @@ class Connection:
|
||||||
if select.select([self._socket], [], []) != ([], [], []):
|
if select.select([self._socket], [], []) != ([], [], []):
|
||||||
# wait for data availiable
|
# wait for data availiable
|
||||||
while True:
|
while True:
|
||||||
# fill buffer with one message
|
try:
|
||||||
data = self._socket.recv(1024)
|
# fill buffer with one message
|
||||||
|
data = self._socket.recv(1024)
|
||||||
|
except BlockingIOError:
|
||||||
|
continue
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
# buffer is empty
|
# buffer is empty
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue