Commit bb6b51ca authored by Vinay Sajip's avatar Vinay Sajip

Issue #17981: Closed socket on error in SysLogHandler.

parent 6166709e
...@@ -856,6 +856,7 @@ class SysLogHandler(logging.Handler): ...@@ -856,6 +856,7 @@ class SysLogHandler(logging.Handler):
try: try:
self.socket.send(msg) self.socket.send(msg)
except socket.error: except socket.error:
self.socket.close() # See issue 17981
self._connect_unixsocket(self.address) self._connect_unixsocket(self.address)
self.socket.send(msg) self.socket.send(msg)
elif self.socktype == socket.SOCK_DGRAM: elif self.socktype == socket.SOCK_DGRAM:
......
...@@ -12,6 +12,8 @@ Core and Builtins ...@@ -12,6 +12,8 @@ Core and Builtins
Library Library
------- -------
- Issue #17981: Closed socket on error in SysLogHandler.
- Issue #17754: Make ctypes.util.find_library() independent of the locale. - Issue #17754: Make ctypes.util.find_library() independent of the locale.
- Fix typos in the multiprocessing module. - Fix typos in the multiprocessing module.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment