From af6275d0a39510f438e8ca6be58e611a2452da90 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 10 Jun 2019 07:04:01 +0100 Subject: [PATCH] prevent Cli from hanging if there are no shared files --- .../main/groovy/com/muwire/core/files/PersisterService.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy b/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy index c554f8ba..63911113 100644 --- a/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/PersisterService.groovy @@ -62,7 +62,9 @@ class PersisterService extends Service { } catch (IllegalArgumentException|NumberFormatException e) { log.log(Level.WARNING, "couldn't load files",e) } - } + } else { + listener.publish(new AllFilesLoadedEvent()) + } timer.schedule({persistFiles()} as TimerTask, 0, interval) loaded = true }