diff --git a/lmwsip.py b/lmwsip.py index 73ed59d..519b497 100644 --- a/lmwsip.py +++ b/lmwsip.py @@ -171,6 +171,10 @@ recieve a answer from the sip server except Exception as e: self.log.error("SipLmw.recv: socket timeout: %s", e) self.closesocket() + raise LmwSipConnectError("LmwSip.recv: No data recieved") + if len(bytebuf) == 0: + self.log.error("SipLmw.recv: no data recieved") + self.closesocket() raise LmwSipConnectError("LmwSip.recv: Socket timeout") try: stringbuf += bytebuf.decode('utf-8')