mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix race due to StopWatchingUser() being called asynchronously
This commit is contained in:
@ -181,10 +181,14 @@ namespace osu.Game.Online.Spectator
|
||||
}
|
||||
|
||||
public void StopWatchingUser(int userId)
|
||||
{
|
||||
// This method is most commonly called via Dispose(), which is asynchronous.
|
||||
// Todo: This should not be a thing, but requires framework changes.
|
||||
Schedule(() =>
|
||||
{
|
||||
watchingUsers.Remove(userId);
|
||||
|
||||
StopWatchingUserInternal(userId);
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract Task BeginPlayingInternal(SpectatorState state);
|
||||
|
Reference in New Issue
Block a user