grpc-js: Add comment about stopKeepalivePings usage

This commit is contained in:
Michael Lumish 2022-04-11 14:43:18 -07:00
parent ae93d556ec
commit 553fb7a819
1 changed files with 5 additions and 0 deletions

View File

@ -384,6 +384,11 @@ export class Subchannel {
* sending pings should also involve some network activity. */
}
/**
* Stop keepalive pings when terminating a connection. This discards the
* outstanding ping timeout, so it should not be called if the same
* connection will still be used.
*/
private stopKeepalivePings() {
clearInterval(this.keepaliveIntervalId);
clearTimeout(this.keepaliveTimeoutId);