Skip to content

Commit 81e08e8

Browse files
committed
grpc-js: Transparently retry session destroyed error
1 parent d8e73f3 commit 81e08e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/grpc-js/src/channel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ export class ChannelImplementation implements Channel {
466466
callConfig.onCommitted?.();
467467
pickResult.onCallStarted?.();
468468
} catch (error) {
469-
if (
470-
(error as NodeJS.ErrnoException).code ===
471-
'ERR_HTTP2_GOAWAY_SESSION'
469+
const errorCode = (error as NodeJS.ErrnoException).code;
470+
if (errorCode === 'ERR_HTTP2_GOAWAY_SESSION' ||
471+
errorCode === 'ERR_HTTP2_INVALID_SESSION'
472472
) {
473473
/* An error here indicates that something went wrong with
474474
* the picked subchannel's http2 stream right before we

0 commit comments

Comments
 (0)