]> granicus.if.org Git - python/commitdiff
Closes #17981: Merged fix from 3.3.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 16 May 2013 22:02:54 +0000 (23:02 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Thu, 16 May 2013 22:02:54 +0000 (23:02 +0100)
1  2 
Lib/logging/handlers.py
Misc/NEWS

index bed09f05d0eb351eecd7c1c4c68ce7c5a64d197d,93aa50ea832ce8fad9ce2061810c8276471f5197..f1ddbb5edaeb4f117f363f0a12257c35d114d202
@@@ -875,7 -881,8 +875,8 @@@ class SysLogHandler(logging.Handler)
              if self.unixsocket:
                  try:
                      self.socket.send(msg)
 -                except socket.error:
 +                except OSError:
+                     self.socket.close()
                      self._connect_unixsocket(self.address)
                      self.socket.send(msg)
              elif self.socktype == socket.SOCK_DGRAM:
diff --cc Misc/NEWS
index ceab576aa304c027c29608551eb7baf44824d383,251804dd5263a508783480ed06d8ce96a16fa6a7..953d57e0790dbb3508fb27a22da71bbdb9d5e1e1
+++ b/Misc/NEWS
@@@ -91,15 -81,6 +91,17 @@@ Core and Builtin
  Library
  -------
  
++- Issue #17981: Closed socket on error in SysLogHandler.
++
 +- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
 +  is long, not int.
 +
 +- Fix typos in the multiprocessing module.
 +
 +- Issue #17754: Make ctypes.util.find_library() independent of the locale.
 +
 +- Issue #17968: Fix memory leak in os.listxattr().
 +
  - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator
    characters() and ignorableWhitespace() methods.  Original patch by Sebastian
    Ortiz Vasquez.