Skip to content

Commit

Permalink
Merge pull request #2063 from murgatroid99/grpc-js_session_destroyed_…
Browse files Browse the repository at this point in the history
…transparent_retry

grpc-js: Transparently retry session destroyed error
  • Loading branch information
murgatroid99 committed Mar 16, 2022
2 parents 18286da + 81e08e8 commit 0dfe2ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/grpc-js/src/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,9 @@ export class ChannelImplementation implements Channel {
callConfig.onCommitted?.();
pickResult.onCallStarted?.();
} catch (error) {
if (
(error as NodeJS.ErrnoException).code ===
'ERR_HTTP2_GOAWAY_SESSION'
const errorCode = (error as NodeJS.ErrnoException).code;
if (errorCode === 'ERR_HTTP2_GOAWAY_SESSION' ||
errorCode === 'ERR_HTTP2_INVALID_SESSION'
) {
/* An error here indicates that something went wrong with
* the picked subchannel's http2 stream right before we
Expand Down

0 comments on commit 0dfe2ee

Please sign in to comment.