You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(bitswap/network): set read deadline before stream Close to prevent blocking
SendMessage() can block indefinitely when the remote peer is slow or
unresponsive during the multistream-select handshake completion.
The fix sets a read deadline (using the calculated send timeout) before
calling stream.Close(), ensuring the operation will time out rather than
block indefinitely.
See: multiformats/go-multistream#47
See: ipshipyard/waterworks-infra#860
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ The following emojis are used to highlight certain changes:
28
28
29
29
### Fixed
30
30
31
+
-`bitswap/network`: Fixed goroutine leak that could cause bitswap to stop serving blocks after extended uptime. The root cause is `stream.Close()` blocking indefinitely when remote peers are unresponsive during multistream handshake ([go-libp2p#3448](https://github.com/libp2p/go-libp2p/pull/3448)). This PR ([#1083](https://github.com/ipfs/boxo/pull/1083)) adds a localized fix specific to bitswap's `SendMessage` by setting a read deadline before closing streams.
0 commit comments