fix client insert/create issue

This commit is contained in:
Lion Kortlepel authored and Anonymous275 committed 2021-03-18 23:44:14 +02:00
1 parent b3256062f7
commit bca4b3f140
4 files changed
+33 -27

No files matched your search

+6
View File
@@ -269,3 +269,9 @@ void TServer::Apply(TClient& c, int VID, const std::string& pckt) {
Veh.Accept(writer);
c.SetCarData(VID, Header + Buffer.GetString());
}
void TServer::InsertClient(std::shared_ptr<TClient> NewClient) {
debug("inserting client (" + std::to_string(ClientCount()) + ")");
WriteLock Lock(mClientsMutex);
(void)mClients.insert(NewClient);
}