]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #17981: Closed socket on error in SysLogHandler.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 16 May 2013 21:57:02 +0000 (22:57 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 16 May 2013 21:57:02 +0000 (22:57 +0100)
Lib/logging/handlers.py
Misc/NEWS

index 95e23a8b78bdfee32d28be66a2c83314f37c1835..93aa50ea832ce8fad9ce2061810c8276471f5197 100644 (file)
@@ -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:
index d6c151ff8f543459bc4e6406c3a2d00a52fcacda..251804dd5263a508783480ed06d8ce96a16fa6a7 100644 (file)
--- 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.