summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py')
-rw-r--r--collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
index 27519b76a..3b94fcdf2 100644
--- a/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
+++ b/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py
@@ -4,6 +4,7 @@
# Author: Ilya Mashchenko (ilyam8)
# SPDX-License-Identifier: GPL-3.0-or-later
+import errno
import socket
try:
@@ -181,7 +182,8 @@ class SocketService(SimpleService):
self._sock.shutdown(2) # 0 - read, 1 - write, 2 - all
self._sock.close()
except Exception as error:
- self.error(error)
+ if not (hasattr(error, 'errno') and error.errno == errno.ENOTCONN):
+ self.error(error)
self._sock = None
def _send(self, request=None):