mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2563 from murgatroid99/grpc-js_handle_keepalive_error
grpc-js: Handle keepalive ping error
This commit is contained in:
commit
4475a9f92e
|
@ -426,6 +426,10 @@ class Http2Transport implements Transport {
|
|||
try {
|
||||
this.session!.ping(
|
||||
(err: Error | null, duration: number, payload: Buffer) => {
|
||||
if (err) {
|
||||
this.keepaliveTrace('Ping failed with error ' + err.message);
|
||||
this.handleDisconnect();
|
||||
}
|
||||
this.keepaliveTrace('Received ping response');
|
||||
this.clearKeepaliveTimeout();
|
||||
this.maybeStartKeepalivePingTimer();
|
||||
|
|
Loading…
Reference in New Issue