Merge pull request #2563 from murgatroid99/grpc-js_handle_keepalive_error

grpc-js: Handle keepalive ping error
This commit is contained in:
Michael Lumish 2023-08-31 10:26:16 -07:00 committed by GitHub
commit 4475a9f92e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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();