Controleer op socket close

This commit is contained in:
2020-08-03 16:43:08 +02:00
parent e2966f52ef
commit d8f33f98a6

View File

@@ -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')