mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:33:21 +08:00
Cancel old web requests when changing filter modes
This commit is contained in:
parent
b0e8561ad3
commit
d6c53e3851
@ -109,6 +109,8 @@ namespace osu.Game.Screens.Multi
|
||||
PollImmediately();
|
||||
}
|
||||
|
||||
private GetRoomsRequest pollReq;
|
||||
|
||||
protected override Task Poll()
|
||||
{
|
||||
if (!api.IsLoggedIn)
|
||||
@ -116,7 +118,8 @@ namespace osu.Game.Screens.Multi
|
||||
|
||||
var tcs = new TaskCompletionSource<bool>();
|
||||
|
||||
var pollReq = new GetRoomsRequest(currentFilter.PrimaryFilter);
|
||||
pollReq?.Cancel();
|
||||
pollReq = new GetRoomsRequest(currentFilter.PrimaryFilter);
|
||||
|
||||
pollReq.Success += result =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user