File 0412-ssh-Insert-try-.-for-missing-Group-recovery.patch of Package erlang

From 3b65d1f92ca3d1530005b7dd44dec6899169041f Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Tue, 23 Aug 2022 18:01:51 +0200
Subject: [PATCH] ssh: Insert try ... for missing Group recovery

---
 lib/ssh/src/ssh_client_channel.erl | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/ssh/src/ssh_client_channel.erl b/lib/ssh/src/ssh_client_channel.erl
index 7132e32fe5..254b8e85ff 100644
--- a/lib/ssh/src/ssh_client_channel.erl
+++ b/lib/ssh/src/ssh_client_channel.erl
@@ -261,10 +261,9 @@ handle_info({ssh_cm, ConnectionManager, {closed, ChannelId}},
     (catch ssh_connection:close(ConnectionManager, ChannelId)),
     {stop, normal, State#state{close_sent = true}};
 
-handle_info({ssh_cm, _, _} = Msg, #state{cm = ConnectionManager,
-			channel_cb = Module, 
-			channel_state = ChannelState0} = State) ->
-    case Module:handle_ssh_msg(Msg, ChannelState0) of
+handle_info({ssh_cm, _, _} = Msg, #state{channel_cb = Module, 
+                                         channel_state = ChannelState0} = State) ->
+    try Module:handle_ssh_msg(Msg, ChannelState0) of
 	{ok, ChannelState} ->
 	    adjust_window(Msg),
 	    {noreply, State#state{channel_state = ChannelState}};
@@ -272,9 +271,10 @@ handle_info({ssh_cm, _, _} = Msg, #state{cm = ConnectionManager,
 	    adjust_window(Msg),
 	    {noreply, State#state{channel_state = ChannelState}, Timeout};
 	{stop, ChannelId, ChannelState} ->
-	    catch ssh_connection:close(ConnectionManager, ChannelId),
-	    {stop, normal, State#state{close_sent = true,
-				       channel_state = ChannelState}}
+            do_the_close(Msg, ChannelId, State#state{channel_state = ChannelState})
+    catch
+        error:_ ->
+            do_the_close(Msg, State#state.channel_id, State)
     end;
 
 handle_info(Msg, #state{channel_cb = Module, 
-- 
2.35.3

openSUSE Build Service is sponsored by