Commit d9b2a196 authored by Christopher Schinnerl's avatar Christopher Schinnerl

add check to ownedProcessDownloadChunk

parent 78dd427b
......@@ -182,7 +182,7 @@ func (w *worker) ownedProcessDownloadChunk(udc *unfinishedDownloadChunk) *unfini
// worker and return nil. Worker only needs to be removed if worker is being
// dropped.
udc.mu.Lock()
chunkComplete := udc.piecesCompleted >= udc.erasureCode.MinPieces()
chunkComplete := udc.piecesCompleted >= udc.erasureCode.MinPieces() || udc.download.staticComplete()
chunkFailed := udc.piecesCompleted+udc.workersRemaining < udc.erasureCode.MinPieces()
pieceData, workerHasPiece := udc.staticChunkMap[string(w.contract.HostPublicKey.Key)]
pieceCompleted := udc.completedPieces[pieceData.index]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment