Skip to content
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

TowerService should be clone-able for handling concurrent request #950

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

patrickkuo
Copy link
Contributor

Summary

TowerService should be cloneable like tower's ServiceFn

It is difficult to use the service in async block. e.g. when implementing middleware layer service, self.inner.call(req) cannot be called inside the async block, making it impossible to examine the request body before calling the inner service.

@niklasad1
Copy link
Member

Thanks for your PR, ideally we would have a lint against this.... but couldn't find any

@niklasad1 niklasad1 merged commit 2fd92e3 into paritytech:master Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants