File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Plugins/Flow.Launcher.Plugin.PluginsManager Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
153
153
if ( File . Exists ( filePath ) )
154
154
File . Delete ( filePath ) ;
155
155
156
- using var response = await HttpClient . GetAsync ( plugin . UrlDownload , HttpCompletionOption . ResponseHeadersRead ) . ConfigureAwait ( false ) ;
156
+ using var cts = new CancellationTokenSource ( ) ;
157
+ using var response = await HttpClient . GetAsync ( plugin . UrlDownload , HttpCompletionOption . ResponseHeadersRead , cts . Token ) . ConfigureAwait ( false ) ;
157
158
158
159
response . EnsureSuccessStatusCode ( ) ;
159
160
@@ -166,7 +167,7 @@ internal async Task InstallOrUpdateAsync(UserPlugin plugin)
166
167
{
167
168
if ( prgBox != null )
168
169
{
169
- HttpClient . CancelPendingRequests ( ) ;
170
+ cts . Cancel ( ) ;
170
171
downloadCancelled = true ;
171
172
}
172
173
} ) ) != null )
You can’t perform that action at this time.
0 commit comments