From d0bf8ddc55979cb9d3451f6f2f1c78bfe4e3c03b Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Wed, 11 Jan 2017 11:54:01 -0800 Subject: [PATCH] fix bug in ReadManyValues (#3059) --- go/types/value_store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/types/value_store.go b/go/types/value_store.go index 45660fb6ab..57b7ad19de 100644 --- a/go/types/value_store.go +++ b/go/types/value_store.go @@ -187,6 +187,10 @@ func (lvs *ValueStore) ReadManyValues(hashes hash.HashSet, foundValues chan<- Va remaining.Insert(h) } + if len(remaining) == 0 { + return + } + // Request remaining hashes from BatchStore, processing the found chunks as they come in. foundChunks := make(chan *chunks.Chunk, 16) foundHashes := hash.HashSet{}