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

Expose closeFuture in server interceptor context #1553

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jan 11, 2023

Motivation:

Server calls expose a closeFuture where users can register callbacks to tear things down when the RPC ends. Interceptors don't have this capability and must rely on observing an .end.

Modifications:

Expose the closeFuture from ServerCallContext to the ServerInterceptorContext.

Result:

Motivation:

Server calls expose a `closeFuture` where users can register callbacks
to tear things down when the RPC ends. Interceptors don't have this
capability and must rely on observing an `.end`.

Modifications:

Expose the `closeFuture` from `ServerCallContext` to
the `ServerInterceptorContext`.

Result:

- Users can be notified in interceptors when the call ends.
- Resolves grpc#1552
@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label Jan 11, 2023
@glbrntt glbrntt requested a review from Lukasa January 11, 2023 13:32
@glbrntt glbrntt merged commit bcca31f into grpc:main Jan 11, 2023
@glbrntt glbrntt deleted the gb-close-future branch January 11, 2023 13:42
WendellXY pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

Server calls expose a `closeFuture` where users can register callbacks
to tear things down when the RPC ends. Interceptors don't have this
capability and must rely on observing an `.end`.

Modifications:

Expose the `closeFuture` from `ServerCallContext` to
the `ServerInterceptorContext`.

Result:

- Users can be notified in interceptors when the call ends.
- Resolves grpc#1552
pinlin168 pushed a commit to sundayfun/grpc-swift that referenced this pull request Aug 24, 2023
Motivation:

Server calls expose a `closeFuture` where users can register callbacks
to tear things down when the RPC ends. Interceptors don't have this
capability and must rely on observing an `.end`.

Modifications:

Expose the `closeFuture` from `ServerCallContext` to
the `ServerInterceptorContext`.

Result:

- Users can be notified in interceptors when the call ends.
- Resolves grpc#1552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ServerInterceptorContext should provide closeFuture similar to ServerCallContext
2 participants