camget: buffer the workc channel

Change-Id: Ic6bf443c4d91f240b0b86c34a33bf74a1f2b627f
This commit is contained in:
Brad Fitzpatrick 2013-01-05 16:44:43 -08:00
parent 9f6776dddb
commit ff9492c6cd
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ func smartFetch(src blobref.StreamingFetcher, targ string, br *blobref.BlobRef)
br *blobref.BlobRef
errc chan<- error
}
workc := make(chan work)
workc := make(chan work, len(sc.Members))
defer close(workc)
for i := 0; i < numWorkers; i++ {
go func() {