Skip to content

Conversation

@edrex
Copy link
Contributor

@edrex edrex commented Mar 9, 2017

Proposed fix for #1111. I've already signed the CLA for another Google project (Camlistore).

I'm not aware of a golang construct which can completely guarantee the out chan won't be written to after the closed chan is closed but a nested select like this makes the window when that can happen way smaller. Specifically this change fixes the panic in #1111. Suggestions for improvements?

@edrex edrex changed the title fix server panic trying to send on stream as client disconnects #1111 fix server panic sending to closed stream #1111 Mar 9, 2017
@dfawley dfawley removed the 1.2 label Mar 20, 2017
Copy link
Contributor

@menghanl menghanl left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the fix.

@menghanl
Copy link
Contributor

Though this PR doesn't fix the root problem, it changes the failure from half the time to a race condition.

Given that we don't have enough time to look into this issue, I'm going to merge this change. Please send another PR if you think that can fix the root cause.

@menghanl menghanl merged commit 135247d into grpc:master May 15, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

3 participants