grpc-js: Implement Server#unbind
#2612
Merged
+655
−329
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.
This implements L109: Node: Server API to unbind ports.
Most of the work was in refactoring
bindAsync
to makeunbind
implementable, and introducing tracking of previousbindAsync
calls as a unit. As a result,bindAsync
behavior has slight changes to observable behavior: when making abindAsync
call with the same target string as a previous call, if the credentials are equivalent, the result of the previous call is passed along to the new callback, but if they are different, the new call fails with an error.The new
ServerCredentials#_equals
andcombineHostPort
functions are new utility functions that were needed to implement the newbindAsync
behavior.The change in
subchannel.ts
was a fix to prevent tests from spuriously holding the process open with connection backoff timers.