mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Don't rethrow OperationCanceledException
This commit is contained in:
parent
8330dd356f
commit
4e3746f77d
1 changed files with 6 additions and 2 deletions
|
|
@ -254,7 +254,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
catch (OperationCanceledException)
|
||||
{
|
||||
await buffer.DisposeAsync();
|
||||
throw;
|
||||
return Stream.Null;
|
||||
}
|
||||
|
||||
buffer.Seek(0, SeekOrigin.Begin);
|
||||
|
|
@ -289,11 +289,15 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
|
||||
{
|
||||
var output = await ExecuteQueryAsync(query, token);
|
||||
try
|
||||
{
|
||||
var output = await ExecuteQueryAsync(query, token);
|
||||
return await DeserializedResultAsync(output);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"|JsonRPCPlugin.Query|Exception when query <{query}>", e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue