projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea1eda2
)
Issue #15179: Closed socket on connection failure. Thanks to Kazutaka Morita for...
author
Vinay Sajip
<vinay_sajip@yahoo.co.uk>
Mon, 25 Jun 2012 22:17:07 +0000
(23:17 +0100)
committer
Vinay Sajip
<vinay_sajip@yahoo.co.uk>
Mon, 25 Jun 2012 22:17:07 +0000
(23:17 +0100)
Lib/logging/handlers.py
patch
|
blob
|
history
diff --git
a/Lib/logging/handlers.py
b/Lib/logging/handlers.py
index 5af73e9ff7e128c4243f1c2c7224f338143cb6cf..19a5f10ed1cd9b1c77123453beb600a17cf0bfeb 100644
(file)
--- a/
Lib/logging/handlers.py
+++ b/
Lib/logging/handlers.py
@@
-771,7
+771,11
@@
class SysLogHandler(logging.Handler):
except socket.error:
self.socket.close()
self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- self.socket.connect(address)
+ try:
+ self.socket.connect(address)
+ except socket.error:
+ self.socket.close()
+ raise
# curious: when talking to the unix-domain '/dev/log' socket, a
# zero-terminator seems to be required. this string is placed