Skip to content

Commit 353f597

Browse files
authored
Merge pull request #63 from fsouza/fix-data-race
Copy pointer to prevent data race on pipe connection
2 parents 7ff8994 + 6f65f52 commit 353f597

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ func (l *win32PipeListener) listenerRoutine() {
265265
if err == nil {
266266
// Wait for the client to connect.
267267
ch := make(chan error)
268-
go func() {
268+
go func(p *win32File) {
269269
ch <- connectPipe(p)
270-
}()
270+
}(p)
271271
select {
272272
case err = <-ch:
273273
if err != nil {

0 commit comments

Comments
 (0)