Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protocols/kad: Limit # of inbound substreams to 32 (#2699)
* protocols/kad/: Split into outbound and inbound substreams * protocols/kad: Limit # of inbound substreams to 32 A remote node may still send more than 32 requests in parallel by using more than one connection or by sending more than one request per stream. * protocols/kad: Favor new substreams over old ones waiting for reuse When a new inbound substream comes in and the limit of total inbound substreams is hit, try to find an old inbound substream waiting to be reused. In such case, replace the old with the new. In case no such old substream exists, drop the new one.
- Loading branch information