summaryrefslogtreecommitdiffstats
path: root/python.d
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-11-12 16:08:28 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-11-12 16:08:28 +0200
commitfc92083cf7aca43aa8c0141b806b516aede8f396 (patch)
tree94c86754ddca175583216387424725f983ae8b5d /python.d
parent63905a8f2c48ef89d8c46f30b3db76986143147c (diff)
SocketService log unexpectedly disconnected error
Diffstat (limited to 'python.d')
-rw-r--r--python.d/python_modules/base.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python.d/python_modules/base.py b/python.d/python_modules/base.py
index ca9479794c..e86635f959 100644
--- a/python.d/python_modules/base.py
+++ b/python.d/python_modules/base.py
@@ -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