diff --git a/mitel_ommclient2/connection.py b/mitel_ommclient2/connection.py index e26bc72..482bb85 100644 --- a/mitel_ommclient2/connection.py +++ b/mitel_ommclient2/connection.py @@ -55,8 +55,11 @@ class Connection: if select.select([self._socket], [], []) != ([], [], []): # wait for data availiable while True: - # fill buffer with one message - data = self._socket.recv(1024) + try: + # fill buffer with one message + data = self._socket.recv(1024) + except BlockingIOError: + continue if not data: # buffer is empty