mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-21 07:46:54 +00:00
Decreased the scope of read mutex
This commit is contained in:
1 parent
24994d7dde
commit
f323d50e34
6 files changed
+97
-64
No files matched your search
@@ -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