summaryrefslogtreecommitdiffstats
path: root/Lib/logging/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r--Lib/logging/handlers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 5837f4e..c4b8746 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -856,6 +856,7 @@ class SysLogHandler(logging.Handler):
try:
self.socket.send(msg)
except socket.error:
+ self.socket.close() # See issue 17981
self._connect_unixsocket(self.address)
self.socket.send(msg)
elif self.socktype == socket.SOCK_DGRAM: