diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-05-16 21:57:02 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-05-16 21:57:02 (GMT) |
commit | 862b15e7d0402d3aabe224ca33e45f4e9aa6dd00 (patch) | |
tree | 54f0f53324ce7d886a61659b66ef354be33a36b1 /Lib/logging | |
parent | 18b71916531f6b235993aaeaedfb7176b4658aa9 (diff) | |
download | cpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.zip cpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.tar.gz cpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.tar.bz2 |
Issue #17981: Closed socket on error in SysLogHandler.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/handlers.py | 1 |
1 files changed, 1 insertions, 0 deletions
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: |