diff --git a/libraries/networking/src/udt/SendQueue.cpp b/libraries/networking/src/udt/SendQueue.cpp index ac6c8238e8..d814dfdcdc 100644 --- a/libraries/networking/src/udt/SendQueue.cpp +++ b/libraries/networking/src/udt/SendQueue.cpp @@ -230,13 +230,12 @@ void SendQueue::overrideNAKListFromPacket(ControlPacket& packet) { } void SendQueue::handshakeACK() { - std::unique_lock locker { _handshakeMutex }; - - _hasReceivedHandshakeACK = true; - - // unlock the mutex and notify on the handshake ACK condition - locker.unlock(); + { + std::unique_lock locker { _handshakeMutex }; + _hasReceivedHandshakeACK = true; + } + // Notify on the handshake ACK condition _handshakeACKCondition.notify_one(); }