Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a8f510

Browse files
committed
Closes #17981: Merged fix from 3.3.
2 parents 43b2ab9 + 862b15e commit 3a8f510

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/logging/handlers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ def emit(self, record):
876876
try:
877877
self.socket.send(msg)
878878
except OSError:
879+
self.socket.close()
879880
self._connect_unixsocket(self.address)
880881
self.socket.send(msg)
881882
elif self.socktype == socket.SOCK_DGRAM:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Core and Builtins
9191
Library
9292
-------
9393

94+
- Issue #17981: Closed socket on error in SysLogHandler.
95+
9496
- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
9597
is long, not int.
9698

0 commit comments

Comments
 (0)