aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/protocols
diff options
context:
space:
mode:
authorGiulio Grassi <gigrassi@cisco.com>2020-10-15 16:32:28 +0200
committerGiulio Grassi <gigrassi@cisco.com>2020-10-15 16:36:16 +0200
commit56125366e9d8e526f64b43f661c6c5c3b2fb6f8a (patch)
tree61ba54ca11a17a1596e883f032ddcddc71825954 /libtransport/src/protocols
parent9f0176d9061e102d16dac99ba8d7b5a4b663ab9c (diff)
[HICN-647] Freezing CWND if the production rate of the producer is equal to 0
Signed-off-by: Giulio Grassi <gigrassi@cisco.com> Change-Id: Ie98870659463fae060ea135ea3a6ce40be905ad0
Diffstat (limited to 'libtransport/src/protocols')
-rw-r--r--libtransport/src/protocols/rtc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libtransport/src/protocols/rtc.cc b/libtransport/src/protocols/rtc.cc
index b1502f51f..a01b8daa5 100644
--- a/libtransport/src/protocols/rtc.cc
+++ b/libtransport/src/protocols/rtc.cc
@@ -348,6 +348,8 @@ void RTCTransportProtocol::computeMaxWindow(uint32_t productionRate,
void RTCTransportProtocol::updateWindow() {
if (currentState_ == HICN_RTC_SYNC_STATE) return;
+ if (estimatedBw_ == 0) return;
+
if (currentCWin_ < maxCWin_ * 0.9) {
currentCWin_ =
min(maxCWin_, (uint32_t)(currentCWin_ * HICN_WIN_INCREASE_FACTOR));