Merge pull request #794 from stevvooe/ng-client-race-condition
Address race condition in client tests (closes #784)
This commit is contained in:
commit
f497bceffa
1 changed files with 7 additions and 0 deletions
|
@ -211,6 +211,13 @@ func (mlw *memoryLayerWriter) Write(p []byte) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mlw *memoryLayerWriter) Close() 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.writing = false
|
||||||
mlw.ml.cond.Broadcast()
|
mlw.ml.cond.Broadcast()
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue