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

Server should send RST_STREAM when deadline is exceeded #2886

Open
ejona86 opened this issue Jun 27, 2019 · 2 comments · May be fixed by #7892
Open

Server should send RST_STREAM when deadline is exceeded #2886

ejona86 opened this issue Jun 27, 2019 · 2 comments · May be fixed by #7892
Assignees
Labels
Area: Server Includes Server, Streams and Server Options. fixit P2 Type: Bug

Comments

@ejona86
Copy link
Member

ejona86 commented Jun 27, 2019

The server code relies on the application to return when the deadline is exceeded. But when it does return, it doesn't cancel the RPC; it sends a graceful close:
https://github.com/grpc/grpc-go/blob/v1.21.1/server.go#L1010

If the deadline is exceeded when the handler returns, the RPC should be cancelled and RST_STREAM should be sent (if one hasn't already been received from the client).

@ejona86
Copy link
Member Author

ejona86 commented Jun 27, 2019

Note that this may have interactions with ServerInHandle, if ServerInHandle changes the deadline. It is only appropriate to use RST_STREAM when the client specified its deadline, since in that case the client will ignore what the server sends anyway. If the ServerInHandler reduced the deadline, then a normal close is appropriate.

@stale stale bot added the stale label Sep 6, 2019
@dfawley dfawley removed the stale label Sep 6, 2019
@grpc grpc deleted a comment from stale bot May 3, 2021
@menghanl menghanl removed the fixit label May 3, 2021
@infovivek2020
Copy link
Contributor

@purnesh42H Please assign to me

@eshitachandwani eshitachandwani added the Area: Server Includes Server, Streams and Server Options. label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Server Includes Server, Streams and Server Options. fixit P2 Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants