mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-05 23:36:23 +00:00
Sentry: use locked contexts to send data to avoid races
This commit is contained in:
@@ -323,6 +323,7 @@ void TServer::Apply(TClient& c, int VID, const std::string& pckt) {
|
||||
std::string VD = c.GetCarData(VID);
|
||||
if (VD.empty()) {
|
||||
error("Tried to apply change to vehicle that does not exist");
|
||||
auto Lock = Sentry.CreateExclusiveContext();
|
||||
Sentry.AddExtra("packet", Packet);
|
||||
Sentry.AddExtra("vehicle-id", std::to_string(VID));
|
||||
Sentry.AddExtra("client-car-count", std::to_string(c.GetCarCount()));
|
||||
|
||||
Reference in New Issue
Block a user