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:
@@ -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. */
|
||||
|
||||
|
Reference in New Issue
Block a user