Skip to content

Commit

Permalink
Remove a socket.close after destroy + bump nim-eth for uTP fixes (sta…
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeme authored Jun 21, 2023
1 parent 4b66f93 commit 2de9c95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fluffy/network/wire/portal_protocol.nim
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,10 @@ proc findContent*(p: PortalProtocol, dst: Node, contentKey: ByteList):
else :
debug "Socket read time-out",
socketKey = socket.socketKey
socket.close()
# Note: This might look a bit strange, be not doing a socket.close()
# here as this is already done internally. utp_socket `checkTimeouts`
# already does a socket.destroy() on timeout. Might want to change the
# API on this later though.
return err("Reading data from socket timed out, content request failed")
except CancelledError as exc:
# even though we already installed cancelCallback on readFut, it is worth
Expand Down

0 comments on commit 2de9c95

Please sign in to comment.