Replace use of compare_exchange_weak with compare_exchange_strong

This fixes a bug where the web server could spuriously fail to start
on 32-bit ARM.
This commit is contained in:
Roke OS Oatpp 2023-07-07 15:47:29 +01:00
parent 9ab1c2a3cb
commit 5b079ccd27

View File

@ -156,7 +156,7 @@ void Server::stop() {
bool Server::setStatus(v_int32 expectedStatus, v_int32 newStatus) {
v_int32 expected = expectedStatus;
return m_status.compare_exchange_weak(expected, newStatus);
return m_status.compare_exchange_strong(expected, newStatus);
}
void Server::setStatus(v_int32 status) {