Decreased the scope of read mutex

This commit is contained in:
Anonymous-275 committed 2021-03-31 00:05:05 +03:00
1 parent 24994d7dde
commit f323d50e34
6 files changed
+97 -64

No files matched your search

-1
View File
@@ -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;