Fix cancellation of downloads.
The Download class cancels asynchronously, which means callers must handle cancellation inside the completion event, and not after requesting cancellation.
This commit is contained in:
@@ -296,11 +296,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
searchStatus = SearchStatus.Fetching;
|
||||
|
||||
Action<DownloadDataCompletedEventArgs, bool> onComplete = (i, cancelled) =>
|
||||
Action<DownloadDataCompletedEventArgs> onComplete = i =>
|
||||
{
|
||||
currentQuery = null;
|
||||
|
||||
if (i.Error != null || cancelled)
|
||||
if (i.Error != null)
|
||||
{
|
||||
RefreshServerListInner(null);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user