-
Notifications
You must be signed in to change notification settings - Fork 30
feat: close connections when too many streams are opened #213
feat: close connections when too many streams are opened #213
Conversation
If we hit the inbound stream limit and the remote peer continues to attempt to open new streams at a rate we consider to be unreasonable, close the connection. Mplex has no notion of backpressure so this is all we can really do to protect ourselves.
## [5.2.0](v5.1.2...v5.2.0) (2022-09-07) ### Features * close connections when too many streams are opened ([#213](#213)) ([9140770](9140770))
🎉 This PR is included in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It looks like it does not need to be polyfilled: However, it is still makes the library less accessible as one still need to specify that What are your thoughts on this? Can we aim to avoid using Node APIs in libp2p libs and their dependencies? Should this only be an library consumer concern? Cheers. |
I was incorrect, it does need to be polyfilled as
|
Actually got resolved overnight: animir/node-rate-limiter-flexible#179 |
Yeah, ideally we don't rely on nodejs apis in our libraries. This one slipped by me |
If we hit the inbound stream limit and the remote peer continues to attempt to open new streams at a rate we consider to be unreasonable, close the connection.
Mplex has no notion of backpressure so this is all we can really do to protect ourselves.