From 9760fdc906f2193fc40333c40a0e88256906a07d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 26 Sep 2016 15:55:23 -0700 Subject: [PATCH] use MAX_PACKETS_IN_FLIGHT as receiver max flow window --- libraries/networking/src/udt/Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 86e7876ef0..b0ce22d456 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -315,8 +315,8 @@ void Connection::sendACK(bool wasCausedBySyncTimeout) { // pack the available buffer size, in packets // in our implementation we have no hard limit on receive buffer size, send the default value - _ackPacket->writePrimitive((int32_t) udt::CONNECTION_RECEIVE_BUFFER_SIZE_PACKETS); - + _ackPacket->writePrimitive((int32_t) udt::MAX_PACKETS_IN_FLIGHT); + if (wasCausedBySyncTimeout) { // grab the up to date packet receive speed and estimated bandwidth int32_t packetReceiveSpeed = _receiveWindow.getPacketReceiveSpeed();