From 7b617e44ae7bbb6733e131a0e250dd4a6d87f6be Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 31 Aug 2016 12:37:52 +0200 Subject: [PATCH] Fixed RTMP rate limiter issue --- src/output/output_rtmp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/output_rtmp.cpp b/src/output/output_rtmp.cpp index bcb68f70..40bac460 100644 --- a/src/output/output_rtmp.cpp +++ b/src/output/output_rtmp.cpp @@ -536,7 +536,7 @@ namespace Mist { void OutRTMP::requestHandler(){ //If needed, slow down the reading to a rate of maxbps on average static bool slowWarned = false; - while (maxbps && (Util::epoch() - myConn.connTime()) && myConn.dataDown() / (Util::epoch() - myConn.connTime()) > maxbps){ + if (maxbps && (Util::epoch() - myConn.connTime()) && myConn.dataDown() / (Util::epoch() - myConn.connTime()) > maxbps){ if (!slowWarned){ WARN_MSG("Slowing down connection from %s because rate of %llukbps > %llukbps", getConnectedHost().c_str(), (myConn.dataDown() / (Util::epoch() - myConn.connTime())) / 128, maxbps / 128); slowWarned = true;