Sentry: use locked contexts to send data to avoid races

This commit is contained in:
Lion Kortlepel
2021-08-10 12:28:06 +02:00
committed by Lion
parent 51e662fdda
commit 1409d4ef80
5 changed files with 9 additions and 1 deletions

View File

@@ -297,6 +297,7 @@ void TNetwork::Authentication(SOCKET TCPSock) {
if (!AuthResponse.IsObject() && Rc != "0") {
ClientKick(*Client, "Backend returned invalid auth response format.");
error("Backend returned invalid auth response format. This should never happen.");
auto Lock = Sentry.CreateExclusiveContext();
Sentry.AddExtra("response-body", Rc);
Sentry.AddExtra("key", RequestString);
Sentry.SetTransaction(Application::GetBackendUrlForAuth() + Target);