Skip to content

Commit

Permalink
Fix issue agoragames#95: Close socket upon connection failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ori Shoshan committed Mar 14, 2017
1 parent 7b004e1 commit 325bac9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions haigha/transports/socket_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def connect(self, (host, port), klass=socket.socket):
"Failed to connect to %s:",
sockaddr,
)
self._sock.close()
continue

# After connecting, switch to full-blocking mode.
Expand Down

0 comments on commit 325bac9

Please sign in to comment.