Closed Jorropo closed 1 year ago
If the channel was unbuffered that would leak go routines. However, the channel is buffered with alpha
slots and we only spawn alpha
queries.
If the channel was unbuffered that would leak go routines. However, the channel is buffered with
alpha
slots and we only spawnalpha
queries.
Indeed I just got lucky and tests were passing at a moment, the actual issue was that Kubo were registering routing events and then synchronously call findprovs, however findprovs might not return until we first find something in the parallel routing helpers, so kubo was not draining the routing events and thus it was blocking the dht's logic.
I moved the call to FindProvidersAsync
in the goroutine Kubo were already using and now it's good.
LGTM, but let's wait for https://github.com/libp2p/go-libp2p-routing-helpers/pull/80 to land before we merge this PR.
This reuse https://github.com/libp2p/go-libp2p-routing-helpers/pull/80 which logs all inputs and outputs