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

Update Router to wait for inner poll_ready before calling inner call #194

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

seanmonstar
Copy link
Contributor

The contract to only call Service::call after seeing ready from poll_ready was just made strong. So, this one step towards making sure we do just that.

Since a router can't call poll_ready on all of its inner routes, instead it requires each service be Clone, and calls poll_ready in its ResponseFuture.

NoCapacity(usize),
NotRecognized,
Invalid,
NotReady(Req, Svc),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These state transitions can be extracted to a shared Oneshot utility in tower-util. (not saying this PR should do it).

Copy link
Contributor

@carllerche carllerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Sean McArthur <sean@buoyant.io>
Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@seanmonstar seanmonstar merged commit 23e02a6 into master Feb 22, 2019
@seanmonstar seanmonstar deleted the router-clone-ready branch February 22, 2019 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants