-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
core: Added changes to make ServerImpl.internalClose() thread-safe #11924
base: master
Are you sure you want to change the base?
core: Added changes to make ServerImpl.internalClose() thread-safe #11924
Conversation
Created this new PR with required changes along with Review points fixes as part of Existing PR #11864 which needs to close as duplicate once this PR merged. |
@@ -581,6 +586,7 @@ public void close(Status status, Metadata trailers) { | |||
// clientStreamListener.closed can trigger clientStream.cancel (see code in | |||
// ClientCalls.blockingUnaryCall), which may race with clientStream.serverClosed as both are | |||
// calling internalCancel(). | |||
closeCalled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eric had commented that the stream implementation should handle whether close had already been called but this PR is doing it in the InProcessTransport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and moved the changes to AbstractServerStream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs work.
…ream implementation.
Fixed the Review comments and PR is Ready for your Re-review. |
core: Added changes to make ServerImpl.internalClose thread-safe
Fixes: #3746