Fix potential deadlock during gameplay tests

This commit is contained in:
smoogipoo 2020-03-03 13:38:10 +09:00
parent 101f207040
commit 2e4adc056f
1 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,10 @@ private void load(OsuConfigManager config)
public void Restart()
{
// The Reset() call below causes speed adjustments to be reset in an async context, leading to deadlocks.
// The deadlock can be prevented by resetting the track synchronously before entering the async context.
track.ResetSpeedAdjustments();
Task.Run(() =>
{
track.Reset();