1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #23317 from LK4D4/fix_bytepipe_race

ioutils: fix race in access closeErr in bytespipe
This commit is contained in:
Antonio Murdaca 2016-06-06 20:46:01 +02:00
commit 3d80884f3d

View file

@ -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
}
}