Compat for Result Analyzer engine PR (#9966)

This commit is contained in:
Pieter-Jan Briers
2022-07-23 11:08:11 +02:00
committed by GitHub
parent 0542726907
commit de9df5386f
3 changed files with 11 additions and 1 deletions

View File

@@ -156,11 +156,13 @@ namespace Content.Server.GameTicking
// TODO FIXME AAAAAAAAAAAAAAAAAAAH THIS IS BROKEN
// Task.Run as a terrible dirty workaround to avoid synchronization context deadlock from .Result here.
// This whole setup logic should be made asynchronous so we can properly wait on the DB AAAAAAAAAAAAAH
#pragma warning disable RA0004
RoundId = Task.Run(async () =>
{
var server = await _db.AddOrGetServer(serverName);
return await _db.AddNewRound(server, playerIds);
}).Result;
#pragma warning restore RA0004
var startingEvent = new RoundStartingEvent(RoundId);
RaiseLocalEvent(startingEvent);