* Snapshot rcmgr defaults and test that we keep consistent defaults
* Don't use autoscaled defaults since we can't predict the env these tests will run in
* Normalize for windows
* fix: in the swarm move Connectedness emit after releasing conns
go-libp2p-kad-dht now listen to both EvtPeerIdentificationCompleted and EvtPeerConnectednessChanged
and EvtPeerIdentificationCompleted calls .ConnsToPeer inorder to do some filtering.
However it happens that it deadlocks because if the swarm is trying to emit a EvtPeerConnectednessChanged
while the subscriber is trying to process an EvtPeerIdentificationCompleted, the subscriber is stuck on
s.conns.RLock() while the swarm wont release it before having sent EvtPeerConnectednessChanged.
Deadlock !
I havn't confirmed this fixes my bug given this takes time to reproduce, I'll startup a new experiment soon.
* Fix other deadlock and add a test
* Make test a little faster
* Bind on localhost
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Add test for lots of data and lots of streams
* Add some logs
* Close hosts
* Remove alloc measurement in many big pings
* Rename fake proto
* Skip windows and add comments
* fix typo
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* transport/webtransport: close the challenge stream
Once the challenge succeeded there is no reason to keep the challenge stream open, it will never be used again.
* webtransport: defer closing of challenge stream
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Remove duplicate `SetProtocol` call
* Don't log if transport ErrListenerClosed
* Close the conn scope in webtransport dial
* Mock resource scope span
* Add transport rcmgr integration test
* PR nits
* Fix flakiness
* Threadsafe way of waiting for all streams
* Expand comment
* tests: add integration tests for gating of outgoing connections
* tests: integrate connection gating tests into the transport tests
* disable gating tests with race detector
* Revert "websocket: don't set a WSS multiaddr for accepted unencrypted conns (#2199)"
This reverts commit eeb685f68f.
* Revert "websocket: Don't limit message sizes in the websocket reader (#2193)"
This reverts commit 2fe6600ca4.
* Revert "websocket: Replace gorilla websocket transport with nhooyr websocket transport (#1982)"
* websocket: don't set a WSS multiaddr for accepted unencrypted conns
This solves a deadlock when AddCertHashes is called before Listen.
It also means that we're initializing a certmanaer even if we're only using the
WebTransport transport for dialing and not for listening, but that's a fringe
use case anyway.