mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-06 15:56:18 +00:00
Sentry: use locked contexts to send data to avoid races
This commit is contained in:
@@ -47,7 +47,7 @@ void TSentry::Log(sentry_level_t level, const std::string& logger, const std::st
|
||||
|
||||
void TSentry::LogDebug(const std::string& text, const std::string& file, const std::string& line) {
|
||||
SetTransaction(file + ":" + line);
|
||||
Log(SENTRY_LEVEL_DEBUG, "default", file + ": " + text);
|
||||
Log(SENTRY_LEVEL_DEBUG, "default", file + ": " + text);
|
||||
}
|
||||
|
||||
void TSentry::AddExtra(const std::string& key, const sentry_value_t& value) {
|
||||
@@ -86,3 +86,7 @@ void TSentry::SetTransaction(const std::string& id) {
|
||||
}
|
||||
sentry_set_transaction(id.c_str());
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> TSentry::CreateExclusiveContext() {
|
||||
return std::unique_lock<std::mutex>(mMutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user