summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-05-16 21:57:02 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-05-16 21:57:02 (GMT)
commit862b15e7d0402d3aabe224ca33e45f4e9aa6dd00 (patch)
tree54f0f53324ce7d886a61659b66ef354be33a36b1 /Lib
parent18b71916531f6b235993aaeaedfb7176b4658aa9 (diff)
downloadcpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.zip
cpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.tar.gz
cpython-862b15e7d0402d3aabe224ca33e45f4e9aa6dd00.tar.bz2
Issue #17981: Closed socket on error in SysLogHandler.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/logging/handlers.py1
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: