mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #15179: Closed socket on connection failure. Thanks to Kazutaka Morita for the patch.
This commit is contained in:
parent
1dd75a64aa
commit
3e6d71d336
1 changed files with 5 additions and 1 deletions
|
|
@ -761,7 +761,11 @@ def _connect_unixsocket(self, address):
|
|||
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
|
||||
|
||||
def encodePriority(self, facility, priority):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue