Skip to content

Commit

Permalink
Merge pull request #23317 from LK4D4/fix_bytepipe_race
Browse files Browse the repository at this point in the history
ioutils: fix race in access closeErr in bytespipe
  • Loading branch information
runcom committed Jun 6, 2016
2 parents 5ce2f14 + b324784 commit 3d80884
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/ioutils/bytespipe.go
Expand Up @@ -133,8 +133,9 @@ func (bp *BytesPipe) Read(p []byte) (n int, err error) {
}
bp.wait.Wait()
if bp.bufLen == 0 && bp.closeErr != nil {
err := bp.closeErr
bp.mu.Unlock()
return 0, bp.closeErr
return 0, err
}
}

Expand Down

0 comments on commit 3d80884

Please sign in to comment.