mirror of https://github.com/grpc/grpc-node.git
				
				
				
			Merge pull request #2087 from murgatroid99/grpc-js_keepalive_timeout_no_calls
grpc-js: Don't clear ping timeout when still connected
This commit is contained in:
		
						commit
						fc54c15909
					
				|  | @ -378,6 +378,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); | ||||
|  | @ -767,7 +772,7 @@ export class Subchannel { | |||
|       } | ||||
|       this.backoffTimeout.unref(); | ||||
|       if (!this.keepaliveWithoutCalls) { | ||||
|         this.stopKeepalivePings(); | ||||
|         clearInterval(this.keepaliveIntervalId); | ||||
|       } | ||||
|       this.checkBothRefcounts(); | ||||
|     } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue