From 7bcc9ac181b3caa7e4bba1cdba884b4f385ac19d Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 1 May 2021 22:10:51 +0200 Subject: [PATCH] Cancel group host shutdown timer with new request Or else we will still shut down the host when loading the new plugin takes a while. --- src/wine-host/bridges/group.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wine-host/bridges/group.cpp b/src/wine-host/bridges/group.cpp index 3605b3aa..9bb9d9d2 100644 --- a/src/wine-host/bridges/group.cpp +++ b/src/wine-host/bridges/group.cpp @@ -198,6 +198,10 @@ void GroupBridge::accept_requests() { "' using socket endpoint base directory '" + request.endpoint_base_dir + "'"); try { + // Cancel the (initial) shutdown timer, since the plugin may + // take longer to initialize if it is new + shutdown_timer.cancel(); + std::unique_ptr bridge = nullptr; switch (request.plugin_type) { case PluginType::vst2: @@ -247,6 +251,8 @@ void GroupBridge::accept_requests() { logger.log("Error while initializing '" + request.plugin_path + "':"); logger.log(error.what()); + + maybe_schedule_shutdown(5s); } accept_requests();