From 8985427516e8f280dbc98fc42e18729c4d8a4a08 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 8 Oct 2015 19:47:15 -0700 Subject: [PATCH] maintain sent packets lock while re-sending packet --- libraries/networking/src/udt/SendQueue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index d7e3bb2b65..01175d0a94 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -355,11 +355,12 @@ bool SendQueue::maybeResendPacket() { // we found the packet - grab it auto& resendPacket = *(it->second); + // send it off + sendPacket(resendPacket); + // unlock the sent packets sentLocker.unlock(); - // send it off - sendPacket(resendPacket); emit packetRetransmitted(); // Signal that we did resend a packet