fix client insert/create issue

This commit is contained in:
Lion Kortlepel
2021-02-17 10:09:50 +01:00
committed by Anonymous275
parent b3256062f7
commit bca4b3f140
4 changed files with 33 additions and 27 deletions

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);
}