From ac3a1d54b1d5dc1e4ace971802b94aceb1176098 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 28 Aug 2015 10:07:01 -0700 Subject: [PATCH] don't lock in while for maybeResendPacket --- libraries/networking/src/udt/SendQueue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index 7fcf5517b1..1de2b6febc 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -459,9 +459,10 @@ bool SendQueue::maybeSendNewPacket() { } bool SendQueue::maybeResendPacket() { + std::unique_lock naksLocker(_naksLock); + // the following while makes sure that we find a packet to re-send, if there is one while (true) { - std::unique_lock naksLocker(_naksLock); if (_naks.getLength() > 0) { // pull the sequence number we need to re-send