From ea827b180a29806e80f916e437c370f526c48c76 Mon Sep 17 00:00:00 2001 From: jolavillette Date: Sat, 23 May 2020 22:20:49 +0200 Subject: [PATCH] restore 1.1 factor in ft/fttransfermodule --- libretroshare/src/ft/fttransfermodule.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/ft/fttransfermodule.cc b/libretroshare/src/ft/fttransfermodule.cc index ab9900762..8c6ae1f08 100644 --- a/libretroshare/src/ft/fttransfermodule.cc +++ b/libretroshare/src/ft/fttransfermodule.cc @@ -789,16 +789,16 @@ bool ftTransferModule::locked_tickPeerTransfer(peerInfo &info) std::cerr << std::endl; #endif - // cap next_req to desiredRate in order to respect the bandwidth limit and to avoid clogging our outqueue - if (next_req > info.desiredRate) + if (next_req > info.desiredRate * 1.1) { - next_req = info.desiredRate; + next_req = info.desiredRate * 1.1; #ifdef FT_DEBUG std::cerr << "locked_tickPeerTransfer() Reached MaxRate: next_req: " << next_req; std::cerr << std::endl; #endif } + if (next_req > FT_TM_MAX_PEER_RATE) { next_req = FT_TM_MAX_PEER_RATE;