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(); + } } } }