mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
skip if method not found
This commit is contained in:
parent
59f3eeecf2
commit
cea1fcfe47
1 changed files with 15 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ using System.IO.Pipelines;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flow.Launcher.Core.Plugin.JsonRPCV2Models;
|
||||
using Flow.Launcher.Infrastructure.Logger;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Microsoft.VisualStudio.Threading;
|
||||
using StreamJsonRpc;
|
||||
|
|
@ -141,7 +142,20 @@ namespace Flow.Launcher.Core.Plugin
|
|||
|
||||
public virtual async ValueTask DisposeAsync()
|
||||
{
|
||||
await RPC.InvokeAsync("close");
|
||||
try
|
||||
{
|
||||
await RPC.InvokeAsync("close");
|
||||
}
|
||||
catch (RemoteMethodNotFoundException e)
|
||||
{
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception(
|
||||
$"Exception when calling close method for plugin <{Context.CurrentPluginMetadata.Name}>",
|
||||
e);
|
||||
}
|
||||
|
||||
RPC?.Dispose();
|
||||
ErrorStream?.Dispose();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue