From 194a717ad6d742e6185b3b36ddc274a80686fa96 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 4 Jul 2017 13:23:22 +0200 Subject: [PATCH] Incoming pushes now wait for buffer shutdowns and restart it, if needed (no more failing quick successive pushes!), simplified output logic with keepGoing() function, added missing termination checks in some wait loops # Conflicts: # src/output/output.h --- src/output/output.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index 31d18554..9532de92 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -168,6 +168,7 @@ namespace Mist{ if(Triggers::shouldTrigger("CONN_PLAY", streamName)){ std::string payload = streamName+"\n" + getConnectedHost() +"\n"+capa["name"].asStringRef()+"\n"+reqUrl; if (!Triggers::doTrigger("CONN_PLAY", payload, streamName)){ + INFO_MSG("Shutting down due to CONN_PLAY trigger rejection"); onFinish(); myConn.close(); } @@ -237,7 +238,7 @@ namespace Mist{ unsigned int i = 0; tmpEx.setSync(initialSync); //wait max 10 seconds for sync - while ((!tmpEx.getSync() || tmpEx.getSync() == 2) && i++ < 100){ + while ((!tmpEx.getSync() || tmpEx.getSync() == 2) && i++ < 100 && keepGoing()){ Util::wait(100); stats(true); tmpEx = IPC::statExchange(statsPage.getData()); @@ -1216,6 +1217,7 @@ namespace Mist{ if (statsPage.getData()){ /*LTS-START*/ if (!statsPage.isAlive()){ + INFO_MSG("Shutting down on controller request"); onFinish(); myConn.close(); return;