-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
netchan: closing a channel on exported end doesn't propagate to the caller #805
Labels
Comments
Owner changed to r...@golang.org. Status changed to Accepted. |
This issue was closed by revision 752b47c. Status changed to Fixed. |
As mentioned on issue #790, I believe that closing the channel should also flush the buffer prior to returning. |
That's not the way closed works even on local channels. http://golang.org/doc/go_spec.html#Close_and_closed Only the *receiver* should be checking closed. Status changed to Invalid. |
Issue #1116 has been merged into this issue. |
I'm checking for closed on the receiver side. When the sender process exits the receiver gives me "error decoding client header: EOF" even though closed() returns false. I've attached EchoClient and EchoServer. The server gives me the error. Attachments:
|
Sorry, posting to golang-nuts is a little tricky as I am in China behind the GFC and google groups is blocked. I've got a workaround, but it is s...l...o...w. I'm digging into this from the bottom up now. The Go distro has test netchan_test.go. Running as separate processes I get the behaviour documented in issue #790 of last message not being sent and receiver hanging as it doesn't see the close from the sender. This can be fixed by the exporter (sender) calling Drain, but then the reader sees the closing 0 (for ints) or "" (for strings) (couldn't find the bug report I saw for this). If the sender closes without Drain, then the reader doesn't see closed. Importer doesn't have a Drain method so can't successfully signal closure to a reader. This requires separate processes to demonstrate, not goroutines. So... Importer needs a Drain method at least. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by ghexsel:
The text was updated successfully, but these errors were encountered: