Coding standart for locks

This commit is contained in:
Atlante45 2015-09-17 16:27:31 +02:00
parent a34e1d85a5
commit 3a61e6b6a3

View file

@ -230,13 +230,12 @@ void SendQueue::overrideNAKListFromPacket(ControlPacket& packet) {
}
void SendQueue::handshakeACK() {
std::unique_lock<std::mutex> locker { _handshakeMutex };
_hasReceivedHandshakeACK = true;
// unlock the mutex and notify on the handshake ACK condition
locker.unlock();
{
std::unique_lock<std::mutex> locker { _handshakeMutex };
_hasReceivedHandshakeACK = true;
}
// Notify on the handshake ACK condition
_handshakeACKCondition.notify_one();
}