Merge pull request #63 from fsouza/fix-data-race

Copy pointer to prevent data race on pipe connection
This commit is contained in:
John Starks
2017-08-02 11:45:34 -07:00
committed by GitHub
+2 -2
View File
@@ -265,9 +265,9 @@ func (l *win32PipeListener) listenerRoutine() {
if err == nil {
// Wait for the client to connect.
ch := make(chan error)
go func() {
go func(p *win32File) {
ch <- connectPipe(p)
}()
}(p)
select {
case err = <-ch:
if err != nil {