From 9575b47e4e7f8a6e7ca7e2d94e02bd8d53b1ae2d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 28 Aug 2015 10:38:15 -0700 Subject: [PATCH] don't unlock double lock outside conditional --- libraries/networking/src/udt/SendQueue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index 1bfefa12e1..e088cb8d8b 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -402,10 +402,10 @@ void SendQueue::run() { // skip to the next iteration continue; } - } - - // we got the try_lock but failed the other conditionals so we need to unlock - doubleLock.unlock(); + } else { + // we got the try_lock but failed the other conditionals so we need to unlock + doubleLock.unlock(); + } } } }