Skip to content

Commit

Permalink
YamlFileConfigurationService: Fix a threading issue (#608)
Browse files Browse the repository at this point in the history
Run service start callback from a separate thread.
  • Loading branch information
mikkokar authored Feb 10, 2020
1 parent e55c172 commit 200482d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ internal class YamlFileConfigurationService(
}

override fun start() = fileMonitoringService.start()
.thenAccept {
.thenAcceptAsync {
LOGGER.info("service starting - {}", config.originsFile)
initialised.await()
LOGGER.info("service started - {}", config.originsFile)
}

override fun stop() = fileMonitoringService.stop()
.thenAccept {
.thenAcceptAsync {
LOGGER.info("service stopped")
}

Expand Down

0 comments on commit 200482d

Please sign in to comment.