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

client.Close() blocks on Windows #13

Open
timpaulshh opened this issue Oct 3, 2016 · 3 comments
Open

client.Close() blocks on Windows #13

timpaulshh opened this issue Oct 3, 2016 · 3 comments

Comments

@timpaulshh
Copy link

Hey,
using pie I've noticed that calling Close() on the client returned by pie.StartProviderCodec does not seem to work running on Windows. The call just blocks indefinitely. Your own sample code can be used to reproduce this issue. On Linux everything runs fine.
I'm not sure if this is an issue with pie specifically or with Go's implementation of RPC. A quick Google search didn't bring up anything. Any ideas what could be the problem?
I'm using Windows 10 and Go 1.7.

@timidev
Copy link

timidev commented Aug 24, 2017

I meet the same problem.
I'm using Windows 7 and Go 1.8.
Can you fix this please?

@natefinch
Copy link
Owner

natefinch commented Aug 24, 2017 via email

@timidev
Copy link

timidev commented Aug 24, 2017

I fixed this problem.
iop.ReadCloser.Close() will block in windows 7 , I change the close squeue and fix it. Changing like bellow:
// Close closes the pipe's WriteCloser, ReadClosers, and process.
func (iop ioPipe) Close() error {
var err error
if writeErr := iop.WriteCloser.Close(); writeErr != nil {
err = writeErr
}
err = iop.ReadCloser.Close()
if procErr := iop.closeProc(); procErr != nil {
err = procErr
}
return err
}

fix.patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants