diff --git a/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy b/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy index 97cb1cd3..4c04bf83 100644 --- a/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy +++ b/core/src/main/groovy/com/muwire/core/upload/UploadManager.groovy @@ -209,8 +209,11 @@ public class UploadManager { Uploader uploader = new HashListUploader(e, fullInfoHash, request) eventBus.publish(new UploadEvent(uploader : uploader, first: true)) // hash list is always a first try { - uploader.respond() - eventBus.publish(new UploadFinishedEvent(uploader : uploader)) + try { + uploader.respond() + } finally { + eventBus.publish(new UploadFinishedEvent(uploader: uploader)) + } // proceed with content boolean first = true