mirror of https://github.com/zlatinb/muwire
make sure an UploadFinishedEvent always follows an UploadEvent, even if hashlist upload fails
parent
67f85cfa0b
commit
33287c781c
|
@ -209,8 +209,11 @@ public class UploadManager {
|
||||||
Uploader uploader = new HashListUploader(e, fullInfoHash, request)
|
Uploader uploader = new HashListUploader(e, fullInfoHash, request)
|
||||||
eventBus.publish(new UploadEvent(uploader : uploader, first: true)) // hash list is always a first
|
eventBus.publish(new UploadEvent(uploader : uploader, first: true)) // hash list is always a first
|
||||||
try {
|
try {
|
||||||
uploader.respond()
|
try {
|
||||||
eventBus.publish(new UploadFinishedEvent(uploader : uploader))
|
uploader.respond()
|
||||||
|
} finally {
|
||||||
|
eventBus.publish(new UploadFinishedEvent(uploader: uploader))
|
||||||
|
}
|
||||||
|
|
||||||
// proceed with content
|
// proceed with content
|
||||||
boolean first = true
|
boolean first = true
|
||||||
|
|
Loading…
Reference in New Issue