The number of interfaces attached to the CI is unknown to this test. We
shouldn't assert on a specific count.
Co-Authored-By: gammazero <11790789+gammazero@users.noreply.github.com>
streamWrapper.Close() can block indefinitely when the remote peer is slow
or unresponsive during the multistream-select handshake completion.
The lazy multistream protocol negotiation defers reading the handshake
response until Close() is called. If the remote peer doesn't respond,
the read blocks forever, causing goroutine leaks.
This is particularly problematic for bitswap servers where taskWorkers
can get stuck trying to close streams after sending blocks.
The fix sets a read deadline (using DefaultNegotiationTimeout) before
calling the multistream Close(), ensuring the operation will time out
rather than block indefinitely.
Related: https://github.com/multiformats/go-multistream/issues/47
Related: https://github.com/multiformats/go-multistream/pull/48
https://github.com/libp2p/go-libp2p/pull/3364 migrated from zap to slog
but accidentally changed the log level for http.Server.ErrorLog from
implicit INFO to explicit ERROR. This caused client EOF and TLS handshake
errors to spam error logs and stdout in apps which log only ERROR by
default.
These http.Server errors (client EOFs, TLS handshake failures from clients
with naive TLS implementations, connection timeouts from clients that abort
early) are normal operational noise, not actual server errors. Using
LevelDebug:
- matches semantic meaning (similar to existing connection timeout logs)
- respects user's configured threshold (default ERROR filters them out)
- allows users to enable for debugging via log level configuration
Fixes https://github.com/ipfs/kubo/issues/11027
Fixes https://github.com/ipfs/kubo/issues/11033
This improves the reachability detection logic by introducing the concept of primary and secondary addresses. If we have a webtransport address which shares the IP and Port with a QUIC address, the WebTransport address will be considered secondary and the QUIC address will be considered primary.
If the Primary is reachable or unreachable, we require only one confirmation for the Secondary address. This speeds up address verification considerably. We also only refresh secondary addrs reachability once every 3 hours. For primary addresses this duration is 1 hour.