1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Merge pull request #794 from stevvooe/ng-client-race-condition

Address race condition in client tests (closes #784)
This commit is contained in:
Olivier Gambier
2014-12-01 10:10:43 -08:00

View File

@@ -211,6 +211,13 @@ func (mlw *memoryLayerWriter) Write(p []byte) (int, error) {
}
func (mlw *memoryLayerWriter) Close() error {
mlw.ml.cond.L.Lock()
defer mlw.ml.cond.L.Unlock()
return mlw.close()
}
func (mlw *memoryLayerWriter) close() error {
mlw.ml.writing = false
mlw.ml.cond.Broadcast()
return nil