LIVE_BANDWIDTH trigger readability improvement, triggers no longer block stderr.

This commit is contained in:
Thulinma 2018-05-18 17:09:46 +02:00
parent 3947fceeed
commit 937653bc0d
2 changed files with 5 additions and 6 deletions

View file

@ -296,7 +296,9 @@ namespace Mist {
if (currBPS != lastBPS){
lastBPS = currBPS;
if (Triggers::shouldTrigger("LIVE_BANDWIDTH", streamName, liveBW, &lastBPS)){
std::string payload = streamName + "\n" + JSON::Value((long long)lastBPS).asStringRef();
std::stringstream pl;
pl << streamName << "\n" << lastBPS;
std::string payload = pl.str();
if (!Triggers::doTrigger("LIVE_BANDWIDTH", payload, streamName)){
WARN_MSG("Shutting down buffer because bandwidth limit reached!");
config->is_active = false;