mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 01:19:11 +00:00
Fix #9388: thread unsafe use of NetworkAdminConsole/IConsolePrint
This commit is contained in:
@@ -76,6 +76,11 @@ ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler()
|
||||
_network_admins_connected--;
|
||||
Debug(net, 3, "[admin] '{}' ({}) has disconnected", this->admin_name, this->admin_version);
|
||||
if (_redirect_console_to_admin == this->index) _redirect_console_to_admin = INVALID_ADMIN_ID;
|
||||
|
||||
if (this->update_frequency[ADMIN_UPDATE_CONSOLE] & ADMIN_FREQUENCY_AUTOMATIC) {
|
||||
this->update_frequency[ADMIN_UPDATE_CONSOLE] = (AdminUpdateFrequency)0;
|
||||
DebugReconsiderSendRemoteMessages();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -688,6 +693,8 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::Receive_ADMIN_UPDATE_FREQUENC
|
||||
|
||||
this->update_frequency[type] = freq;
|
||||
|
||||
if (type == ADMIN_UPDATE_CONSOLE) DebugReconsiderSendRemoteMessages();
|
||||
|
||||
return NETWORK_RECV_STATUS_OKAY;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user