]> arthur.barton.de Git - netdata.git/commitdiff
SocketService log unexpectedly disconnected error
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 12 Nov 2016 14:08:28 +0000 (16:08 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 12 Nov 2016 14:08:28 +0000 (16:08 +0200)
python.d/python_modules/base.py

index ca9479794ced246b34141dae40f8ba9618de7a7e..e86635f959b49b639f941e7f792e6e7f03773875 100644 (file)
@@ -675,7 +675,10 @@ class SocketService(SimpleService):
                 break
 
             if buf is None or len(buf) == 0:  # handle server disconnect
-                self.debug("server closed the connection")
+                if len(data) == 0:
+                    self._socketerror("unexpectedly disconnected")
+                else:
+                    self.debug("server closed the connection")
                 self._disconnect()
                 break