From 862b15e7d0402d3aabe224ca33e45f4e9aa6dd00 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Thu, 16 May 2013 22:57:02 +0100 Subject: Issue #17981: Closed socket on error in SysLogHandler. --- Lib/logging/handlers.py | 1 + Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 95e23a8..93aa50e 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -882,6 +882,7 @@ class SysLogHandler(logging.Handler): try: self.socket.send(msg) except socket.error: + self.socket.close() self._connect_unixsocket(self.address) self.socket.send(msg) elif self.socktype == socket.SOCK_DGRAM: diff --git a/Misc/NEWS b/Misc/NEWS index d6c151f..251804d 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -21,6 +21,8 @@ Core and Builtins Library ------- +- Issue #17981: Closed socket on error in SysLogHandler. + - Fix typos in the multiprocessing module. - Issue #17754: Make ctypes.util.find_library() independent of the locale. -- cgit v0.12