@cryptotaxi247 / netdata-1 / commits / fc92083cf

SocketService log unexpectedly disconnected error

Costa Tsaousis (ktsaou) committed Nov 12, 2016 at 16:08 UTC fc92083cf7aca43aa8c0141b806b516aede8f396
1 file changed +4 -1
python.d/python_modules/base.py
+4 -1
@@ -675,7 +675,10 @@ class SocketService(SimpleService):
675 break
676
677 if buf is None or len(buf) == 0: # handle server disconnect
678 - self.debug("server closed the connection")
678 + if len(data) == 0:
679 + self._socketerror("unexpectedly disconnected")
680 + else:
681 + self.debug("server closed the connection")
682 self._disconnect()
683 break
684