mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 14:26:09 +00:00
Decreased the scope of read mutex
This commit is contained in:
@@ -48,7 +48,6 @@ std::weak_ptr<TClient> TServer::InsertNewClient() {
|
||||
}
|
||||
|
||||
void TServer::ForEachClient(const std::function<bool(std::weak_ptr<TClient>)>& Fn) {
|
||||
ReadLock Lock(mClientsMutex);
|
||||
for (auto& Client : mClients) {
|
||||
if (!Fn(Client)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user