1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

Codefix: data race in case of a spurious wake up

This commit is contained in:
Rubidium
2025-03-09 18:44:51 +01:00
parent 62a571c892
commit 9fb75dd866

View File

@@ -83,7 +83,7 @@ struct PacketWriter : SaveFilter {
{
std::unique_lock<std::mutex> lock(this->mutex);
if (this->cs != nullptr) this->exit_sig.wait(lock);
while (this->cs != nullptr) this->exit_sig.wait(lock);
/* This must all wait until the Destroy function is called. */