-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(p2p/messaging): single stream per connection (#845)
Description --- Single messaging stream per connection If another stream is requested while one is pending, the pending one is passed back to caller Motivation and Context --- Previously each message sent could cause a new stream to be requested. This resulted in the permitted amount of streams being exhausted. The stream could be used to send a single message and be dropped. This PR checks for pending dial requests or streams and returns the message sink for those. Streams are kept alive so that they may be reused without the overhead of creating a new one each time. How Has This Been Tested? --- 4-VN committee and small 100tx stress test What process can a PR reviewer use to test or verify this change? --- You should not see `Dropping outbound stream because we are at capacity` messages Breaking Changes --- - [x] None - [ ] Requires data directory to be deleted - [ ] Other - Please specify --------- Co-authored-by: stringhandler <[email protected]>
- Loading branch information
1 parent
b49af42
commit c0e09fe
Showing
6 changed files
with
300 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.