-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR_TOO_MANY_OUTBOUND_PROTOCOL_STREAMS
#306
Comments
This will be fixed by #293 |
Do we really need more than one outbound stream per protocol? |
Probably not? Current logic is that the router only tracks / sends data on a single outbound stream per peer. But it might be nice to support your usecase. Right now, the router relies entirely on the registrar/topology (and identify protocol) and inbound protocol dials to establish gossipsub streams with peers. We don't have a way for an application to manually |
Yep, tested locally. Looks good. Thanks. |
Using libp2p latest master, I am getting this error systematically:
This is coming from https://github.com/libp2p/js-libp2p/blob/627b8bf87c775762dd6a9de69b77852e48ebcf26/src/upgrader.ts#L433
There is already a check preventing
GossipSub
to open several outbound streams:js-libp2p-gossipsub/src/index.ts
Line 672 in 0e76f49
However, the existing outbound stream is not detected.
Looking at the logs, I believe that libp2p is opening the outbound stream for the gossip protocol automatically upon connection, and because this stream was not opened by
GossipSub
, then it is not aware of it and the check does not catch it.I use
Libp2p.dialProtocol
.I need to do further investigation to confirm than
dialProtocol
indeed opens the outbound stream automatically.If that's correct then the fix I could implement would be to check on the
connection
object whether an outbound stream is already opened for the protocol. If so, add it toGossipSub.streamsOutbound
:js-libp2p-gossipsub/src/index.ts
Line 672 in 0e76f49
Let me know your thoughts on the propose fixed.
FYI, the logs (I added some
console.log
in there),/vac/waku/relay*
are the gossip protocols I use.The text was updated successfully, but these errors were encountered: