mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2063 from murgatroid99/grpc-js_session_destroyed_transparent_retry
grpc-js: Transparently retry session destroyed error
This commit is contained in:
commit
0dfe2eeb8b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue