diff options
author | Hans Nilsson <[email protected]> | 2018-04-27 14:40:20 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-05-14 12:56:46 +0200 |
commit | 1c22f3cb6a170183fd3c8e938162a01bc82a2677 (patch) | |
tree | ec9bef1c0604cdf5a961335457815e8c778441ea /lib/ssh | |
parent | 3694847de4ed6ee7bd5dba3bb20dce3964a6be46 (diff) | |
download | otp-1c22f3cb6a170183fd3c8e938162a01bc82a2677.tar.gz otp-1c22f3cb6a170183fd3c8e938162a01bc82a2677.tar.bz2 otp-1c22f3cb6a170183fd3c8e938162a01bc82a2677.zip |
ssh: idle_timer sends special msg instead of EXIT
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh_connection_handler.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index dfdad769ed..311c5a2cd6 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1424,6 +1424,10 @@ handle_event(info, {timeout, {_, From} = Request}, _, handle_event(info, {'DOWN', _Ref, process, ChannelPid, _Reason}, _, D0) -> {keep_state, handle_channel_down(ChannelPid, D0)}; + +handle_event(info, idle_timer_timeout, StateName, _) -> + {stop, {shutdown, "Timeout"}}; + %%% So that terminate will be run when supervisor is shutdown handle_event(info, {'EXIT', _Sup, Reason}, StateName, _) -> Role = role(StateName), @@ -2157,7 +2161,7 @@ cache_check_set_idle_timer(D = #data{idle_timer_ref = undefined, %% Yes, we'll set one since the cache is empty and it should not %% be that for a specified time D#data{idle_timer_ref = - erlang:send_after(IdleTime, self(), {'EXIT',[],"Timeout"})}; + erlang:send_after(IdleTime, self(), idle_timer_timeout)}; _ -> %% No - there are entries in the cache D |