From 19113010055a10498869fd941d9cf9ae23931058 Mon Sep 17 00:00:00 2001 From: Angus Antley Date: Thu, 2 May 2019 18:21:08 -0700 Subject: [PATCH] changed to match type of _mss in compare. also changed float to double for correct return type --- libraries/networking/src/udt/CongestionControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/CongestionControl.cpp b/libraries/networking/src/udt/CongestionControl.cpp index 5661f3ab83..37b0165186 100644 --- a/libraries/networking/src/udt/CongestionControl.cpp +++ b/libraries/networking/src/udt/CongestionControl.cpp @@ -29,7 +29,7 @@ void CongestionControl::setMaxBandwidth(int maxBandwidth) { void CongestionControl::setPacketSendPeriod(double newSendPeriod) { Q_ASSERT_X(newSendPeriod >= 0, "CongestionControl::setPacketPeriod", "Can not set a negative packet send period"); - auto packetsPerSecond = _mss > 0.0f ? (double)_maxBandwidth / (BITS_PER_BYTE * _mss) : -1.0f; + auto packetsPerSecond = _mss > 0 ? (double)_maxBandwidth / (BITS_PER_BYTE * _mss) : -1.0; if (packetsPerSecond > 0.0) { // anytime the packet send period is about to be increased, make sure it stays below the minimum period, // calculated based on the maximum desired bandwidth