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

Detect zero-message response to unary request on server-side #2243

Closed
ejona86 opened this issue Sep 8, 2016 · 0 comments · Fixed by #3068
Closed

Detect zero-message response to unary request on server-side #2243

ejona86 opened this issue Sep 8, 2016 · 0 comments · Fixed by #3068
Assignees
Labels
Milestone

Comments

@ejona86
Copy link
Member

ejona86 commented Sep 8, 2016

It appears that a server can respond OK to a unary RPC without any detection on the server-side. It'd be nice to throw an exception if close(OK) is called without first sending a message for a UNARY response, although that may be against our API stability. At the very least, we should convert the OK into a Status saying the server is broken.

As reported in grpc/grpc#8010.

@ejona86 ejona86 added this to the Next milestone Sep 8, 2016
@ejona86 ejona86 added the bug label Mar 14, 2017
zpencer added a commit that referenced this issue Jun 15, 2017
…ry) (#3068)

The current check in ServerCallImpl is theoretically unsafe (#3059). Move that check into the stub, and expand the unit tests to cover other interesting edge cases on the server side:

client sends one, but zero requests received at onHalfClose
client sends one, but > 1 requests received at onHalfClose
server sends one, but zero responses sent at onComplete
server sends one, but > 1 responses sent via onNext
fixes #2243
fixes #3059
@ejona86 ejona86 modified the milestones: 1.5, Next Jul 27, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants