core,netty: block server shutdown until the socket is unbound#5905
Merged
carl-mastrangelo merged 2 commits intogrpc:masterfrom Jun 20, 2019
Merged
core,netty: block server shutdown until the socket is unbound#5905carl-mastrangelo merged 2 commits intogrpc:masterfrom
carl-mastrangelo merged 2 commits intogrpc:masterfrom
Conversation
ejona86
approved these changes
Jun 19, 2019
|
|
||
| /** | ||
| * Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected. | ||
| * After calling this method, clients may no longer connect to the listening socket(s). |
Member
There was a problem hiding this comment.
Nit: I feel like this first sentence is mostly covered by the first. And the user couldn't really notice if we accepted another connection anyway. How about "After this call returns, this server has released the listening socket(s) and it may be reused by another server."
| eventLoopReferenceCounter.release(); | ||
| } | ||
| }); | ||
| if (Thread.currentThread().isInterrupted()) { |
Member
There was a problem hiding this comment.
Why this condition? Is it an optimization? Honestly, I'd prefer not to optimize this case, which also has benefits like the FINE logging happening independent of how interrupt races.
Contributor
Author
There was a problem hiding this comment.
IIRC normal futures throw if they try to block while the thread is interrupted, but I wasn't sure Netty's would do the same. I'm happy to remove it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.