forked from paritytech/jsonrpsee
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server): remove
MethodSinkPermit
to fix backpressure issue on c…
…oncurrent subscriptions (paritytech#1126) * fix(server): don't use `Permit` for responses After a method call has been received, this PR doesn't keep the `Permit` anymore and requires each response to await for a slot in the mpsc buffer. This is especially important for subscriptions which previously two slots were unintentionally required because the server kept one around until the subscription was "accepted" and the subscription itself waited for a slot. If many concurrent subscriptions were received "concurrently" and "filled" the buffer no subscription could make progress. * cleanup code * Update server/src/transport/ws.rs Co-authored-by: James Wilson <james@jsdw.me> * Update core/src/server/helpers.rs Co-authored-by: James Wilson <james@jsdw.me> * cargo fmt --------- Co-authored-by: James Wilson <james@jsdw.me>
- Loading branch information
Showing
3 changed files
with
39 additions
and
54 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
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