Skip to content

Commit

Permalink
Don't close socket on exception
Browse files Browse the repository at this point in the history
Work-around for a bug in asyncio; see #8

Fixes #8
  • Loading branch information
Neil Booth committed Sep 24, 2018
1 parent 90bd505 commit f779092
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiorpcx/socks.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ async def _connect_one(self, host, port):
self.peername = sock.getpeername()
return sock
except Exception as e:
sock.close()
# Don't close - see https://github.com/kyuupichan/aiorpcX/issues/8
# sock.close()
return e

async def _connect(self, addresses):
Expand Down

0 comments on commit f779092

Please sign in to comment.