mirror of https://github.com/zlatinb/muwire
write pieces every time a downloader finishes
parent
3cc0574d11
commit
a9dc636bce
|
@ -307,6 +307,7 @@ public class Downloader {
|
||||||
} catch (Exception bad) {
|
} catch (Exception bad) {
|
||||||
log.log(Level.WARNING,"Exception while downloading",DataUtil.findRoot(bad))
|
log.log(Level.WARNING,"Exception while downloading",DataUtil.findRoot(bad))
|
||||||
} finally {
|
} finally {
|
||||||
|
writePieces()
|
||||||
currentState = WorkerState.FINISHED
|
currentState = WorkerState.FINISHED
|
||||||
if (pieces.isComplete() && eventFired.compareAndSet(false, true)) {
|
if (pieces.isComplete() && eventFired.compareAndSet(false, true)) {
|
||||||
synchronized(piecesFile) {
|
synchronized(piecesFile) {
|
||||||
|
|
Loading…
Reference in New Issue