diff --git a/cmd/erasure-decode.go b/cmd/erasure-decode.go index 6fc5fdadf..716f53a65 100644 --- a/cmd/erasure-decode.go +++ b/cmd/erasure-decode.go @@ -117,6 +117,8 @@ func (p *parallelReader) Read(dst [][]byte) ([][]byte, error) { } readTriggerCh := make(chan bool, len(p.readers)) + defer close(readTriggerCh) // close the channel upon return + for i := 0; i < p.dataBlocks; i++ { // Setup read triggers for p.dataBlocks number of reads so that it reads in parallel. readTriggerCh <- true