Fix the potential issue of causing deadlock problem

Signed-off-by: Steven Zou <szou@vmware.com>
This commit is contained in:
Steven Zou 2018-09-07 14:26:33 +08:00
parent 8cbe5833c7
commit 8ac659c6d2

View File

@ -147,7 +147,10 @@ LOOP:
indexFile, err := rh.getIndexYamlWithNS(ns)
if err != nil {
errorChan <- err
if len(errorChan) == 0 {
//One error is enough, it will be an exit signal to the worker loop
errorChan <- err
}
return
}