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:
@@ -294,8 +294,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
.JoinWith("&");
|
||||
|
||||
new Download(newsURL, cacheFile, e => { },
|
||||
(e, c) => NewsDownloadComplete(e, cacheFile, currentNews,
|
||||
() => newsButton.AttachPanel(newsPanel)));
|
||||
e => NewsDownloadComplete(e, cacheFile, currentNews,
|
||||
() => newsButton.AttachPanel(newsPanel)));
|
||||
}
|
||||
|
||||
newsButton.OnClick = () => newsButton.AttachPanel(newsPanel);
|
||||
|
||||
Reference in New Issue
Block a user