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

api: Clarify expectations regarding ServerCall#close #7580

Merged
merged 3 commits into from Nov 2, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/src/main/java/io/grpc/ServerCall.java
Expand Up @@ -163,6 +163,12 @@ public boolean isReady() {
* <p>Since {@link Metadata} is not thread-safe, the caller must not access (read or write) {@code
* trailers} after this point.
*
* <p>Implementation note: This method is called after the server completed the processing of the
* request (service implementation), but before the response status is sent to the client, so the
ST-DDT marked this conversation as resolved.
Show resolved Hide resolved
* client is still able to cancel the request or a network error might cause it to fail.
* If you wish to know when the call is actually completed/closed, you have to use
* {@link Listener#onComplete} or {@link Listener#onCancel} instead.
*
* @throws IllegalStateException if call is already {@code close}d
*/
public abstract void close(Status status, Metadata trailers);
Expand Down