Skip to content

Conversation

@murgatroid99
Copy link
Member

First, I think this fixes #734. When a Node http2 client session receives a GOAWAY from the server, it sets its closed flag and emits a 'goaway' event immediately, and then emits the 'close' and 'error' (if needed) events a tick or two later. We listen for the 'close' event to know when a session should be considered unusable, and if the channel tries to start a stream in between the 'goaway' event and the 'close' event, it ends with an error. The fix is to simply stop using the subchannel as soon is the 'goaway' event comes in.

Second, RST_STREAM error codes were not getting handled correctly in the stream code, including artificial RST_STREAM errors created by the Node http2 code when a GOAWAY is received.

@murgatroid99 murgatroid99 requested a review from nicolasnoble June 6, 2019 16:50
* function is in the call stack, any exception thrown by the application
* (or our tests) will bubble up and turn into promise rejection, which
* will result in an UnhandledPromiseRejectionWarning. Because that is
* a warning, the error will be effectively swallowed and execution will
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this isn't a warning any longer in node 12. But yes.

@murgatroid99 murgatroid99 merged commit 5b187ba into grpc:master Jun 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Getting metadata from plugin failed with error: New streams cannot be created after receiving a GOAWAY

2 participants