From b4a33479c686718d82f6eff094390be392957e15 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Mon, 27 May 2024 01:15:00 -0500 Subject: [PATCH] dispose other stuff in finally block --- Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs index 37e0961eb..5a6633525 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPluginV2.cs @@ -148,9 +148,11 @@ namespace Flow.Launcher.Core.Plugin catch (RemoteMethodNotFoundException e) { } - - RPC?.Dispose(); - ErrorStream?.Dispose(); + finally + { + RPC?.Dispose(); + ErrorStream?.Dispose(); + } } } }