File 4482-ssh-improve-case-expression-in-get_next_alive_timeou.patch of Package erlang

From b6f207b143f2dab59452eda7aca650d3de849216 Mon Sep 17 00:00:00 2001
From: Alexandre Rodrigues <alexandrejbr@live.com>
Date: Wed, 22 Oct 2025 14:07:46 +0200
Subject: [PATCH 12/20] ssh: improve case expression in get_next_alive_timeout

---
 lib/ssh/src/ssh_connection_handler.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index fb25cce30e..19c1018abe 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -2202,11 +2202,11 @@ get_next_alive_timeout(#ssh{alive_interval = AliveInterval,
                             last_alive_at  = LastAlive})
     when erlang:is_integer(AliveInterval) ->
     TimeToNextAlive = AliveInterval - (erlang:monotonic_time(milli_seconds) - LastAlive),
-    case TimeToNextAlive of
-        Trigger when Trigger =< 0 ->
+    case TimeToNextAlive =< 0 of
+        true ->
             %% Already it is time to disconnect, or to ping
             {true, [{{timeout, alive}, AliveInterval, none}]};
-        TimeToNextAlive ->
+        false ->
             {false, [{{timeout, alive}, TimeToNextAlive, none}]}
     end;
 get_next_alive_timeout(_) ->
-- 
2.51.0

openSUSE Build Service is sponsored by