Skip to content

Commit 0dfe2ee

Browse files
authored
Merge pull request #2063 from murgatroid99/grpc-js_session_destroyed_transparent_retry
grpc-js: Transparently retry session destroyed error
2 parents 18286da + 81e08e8 commit 0dfe2ee

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
@@ -468,9 +468,9 @@ export class ChannelImplementation implements Channel {
468468
callConfig.onCommitted?.();
469469
pickResult.onCallStarted?.();
470470
} catch (error) {
471-
if (
472-
(error as NodeJS.ErrnoException).code ===
473-
'ERR_HTTP2_GOAWAY_SESSION'
471+
const errorCode = (error as NodeJS.ErrnoException).code;
472+
if (errorCode === 'ERR_HTTP2_GOAWAY_SESSION' ||
473+
errorCode === 'ERR_HTTP2_INVALID_SESSION'
474474
) {
475475
/* An error here indicates that something went wrong with
476476
* the picked subchannel's http2 stream right before we

0 commit comments

Comments
 (0)