Fix data race in sync::state, the stop() did not acquire the required lock.

master
faluco 3 years ago committed by Andre Puschmann
parent 5ff6b2eaa9
commit 91677a9dcb

@ -199,7 +199,11 @@ public:
/** /**
* Resets the class, goes back into IDLE mode * Resets the class, goes back into IDLE mode
*/ */
void stop() { state = STATE_IDLE; } void stop()
{
std::unique_lock<std::mutex> lock(mutex);
state = STATE_IDLE;
}
/** /**
* Runs internal FSM, performing Synchronization operations on the provided buffer. It expects data per subframe * Runs internal FSM, performing Synchronization operations on the provided buffer. It expects data per subframe

Loading…
Cancel
Save