From 456bcbca67e1b16abe31290fe85a4390bf3424b7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 26 Sep 2016 15:44:11 -0700 Subject: [PATCH] use max and not min for CW clamp --- libraries/networking/src/udt/TCPVegasCC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/TCPVegasCC.cpp b/libraries/networking/src/udt/TCPVegasCC.cpp index 469cf9b431..cbec63765a 100644 --- a/libraries/networking/src/udt/TCPVegasCC.cpp +++ b/libraries/networking/src/udt/TCPVegasCC.cpp @@ -160,7 +160,7 @@ void TCPVegasCC::performCongestionAvoidance(udt::SequenceNumber ack) { // we never allow the congestion window to be smaller than two packets static int VEGAS_CW_MIN_PACKETS = 2; - _congestionWindowSize = std::min(_congestionWindowSize, VEGAS_CW_MIN_PACKETS); + _congestionWindowSize = std::max(_congestionWindowSize, VEGAS_CW_MIN_PACKETS); // mark this as the last adjustment time _lastAdjustmentTime = p_high_resolution_clock::now();