From 9537aea5c0aa1db1c4325487d2a006093657081e Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 31 Jul 2015 17:31:30 -0700 Subject: [PATCH] Fix nak timeout packet size --- libraries/networking/src/udt/Connection.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/Connection.cpp b/libraries/networking/src/udt/Connection.cpp index 93f61c11aa..56fc1292b6 100644 --- a/libraries/networking/src/udt/Connection.cpp +++ b/libraries/networking/src/udt/Connection.cpp @@ -238,8 +238,7 @@ void Connection::sendNAK(SequenceNumber sequenceNumberRecieved) { void Connection::sendTimeoutNAK() { if (_lossList.getLength() > 0) { // construct a NAK packet that will hold all of the lost sequence numbers - // TODO size is wrong, fix it. - auto lossListPacket = ControlPacket::create(ControlPacket::TimeoutNAK, _lossList.getLength() * sizeof(SequenceNumber)); + auto lossListPacket = ControlPacket::create(ControlPacket::TimeoutNAK, 2 * _lossList.getLength() * sizeof(SequenceNumber)); // Pack in the lost sequence numbers _lossList.write(*lossListPacket);