From cff43da0163ed2f6107486116841de9d4feace27 Mon Sep 17 00:00:00 2001 From: Balder Date: Wed, 19 Aug 2020 14:18:11 +0200 Subject: [PATCH] Fixed controller restarting always-on streams when they were, in fact, still on. --- src/controller/controller_streams.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controller/controller_streams.cpp b/src/controller/controller_streams.cpp index 6e699aed..19e50a80 100644 --- a/src/controller/controller_streams.cpp +++ b/src/controller/controller_streams.cpp @@ -106,7 +106,8 @@ namespace Controller{ if (program){inputProcesses[name] = program;} } // new style always on - if (data.isMember("always_on") && data["always_on"].asBool()){ + if (data.isMember("always_on") && data["always_on"].asBool() && + (!inputProcesses.count(name) || !Util::Procs::isRunning(inputProcesses[name]))){ INFO_MSG("Starting always-on input %s: %s", name.c_str(), URL.c_str()); std::map empty_overrides; pid_t program = 0;