Added TODO: close socket on error

This commit is contained in:
Yuriy Glukhov 2018-04-02 11:26:04 +03:00
parent f17352c243
commit c0471a1376

View File

@ -408,6 +408,7 @@ rlpxProtocol("p2p", 0):
discard
proc rlpxConnect*(keys: KeyPair, address: Address): Future[Peer] {.async.} =
# TODO: Make sure to close the socket in case of exception
result.socket = newAsyncSocket()
await result.socket.connect($address.ip, address.tcpPort)