Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential segmentation fault. #492

Merged
merged 2 commits into from
Aug 13, 2018

Conversation

nicolasnoble
Copy link
Member

Described in #490.

The testcase described there now yields the following error instead of segfaulting:

Error: Cannot call getConnectivityState on a closed Channel
    at Immediate.checkState [as _onImmediate] (/home/pixel/sources/example_for_issue_grpc/node_modules/grpc/src/client.js:723:35)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

We may also want to add testcases for this, but let's stop the bleeding first.

@nicolasnoble
Copy link
Member Author

I'll be unavailable for a week, feel free to amend this PR if need be, it's editable by maintainers.

The errors thrown by `Channel#getConnectivityState` and `Channel#watchConnectivityState` need to be passed to the callback for `Client#waitForReady`.
@murgatroid99 murgatroid99 merged commit 92f4367 into grpc:grpc@1.14.x Aug 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 11, 2018
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.

2 participants