aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection_handler.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-03-30 17:17:34 +0200
committerHans Nilsson <[email protected]>2017-04-04 17:25:41 +0200
commit1cc5affef1dee69e5cb4b7d4aca0465e1072d4d9 (patch)
treefb513fa4ff588f9dcaf21a080bdcf6b545a54b69 /lib/ssh/src/ssh_connection_handler.erl
parent31e9b9c4d3ace33b03eec13d2d0ed22de7a865ab (diff)
downloadotp-1cc5affef1dee69e5cb4b7d4aca0465e1072d4d9.tar.gz
otp-1cc5affef1dee69e5cb4b7d4aca0465e1072d4d9.tar.bz2
otp-1cc5affef1dee69e5cb4b7d4aca0465e1072d4d9.zip
ssh: idle_timer on daemon - implementation
Diffstat (limited to 'lib/ssh/src/ssh_connection_handler.erl')
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index b9c643c77e..15a05a1b85 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -400,7 +400,9 @@ init_process_state(Role, Socket, Opts) ->
timer:apply_after(?REKEY_DATA_TIMOUT, gen_statem, cast, [self(), data_size]),
cache_init_idle_timer(D);
server ->
- D#data{connection_state = init_connection(Role, C, Opts)}
+ cache_init_idle_timer(
+ D#data{connection_state = init_connection(Role, C, Opts)}
+ )
end.
@@ -919,6 +921,9 @@ handle_event(internal, Msg=#ssh_msg_channel_extended_data{}, StateName, D) -
handle_event(internal, Msg=#ssh_msg_channel_eof{}, StateName, D) ->
handle_connection_msg(Msg, StateName, D);
+handle_event(internal, Msg=#ssh_msg_channel_close{}, {connected,server} = StateName, D) ->
+ handle_connection_msg(Msg, StateName, cache_request_idle_timer_check(D));
+
handle_event(internal, Msg=#ssh_msg_channel_close{}, StateName, D) ->
handle_connection_msg(Msg, StateName, D);
@@ -1280,6 +1285,7 @@ handle_event(info, {'EXIT', _Sup, Reason}, _, _) ->
{stop, {shutdown, Reason}};
handle_event(info, check_cache, _, D) ->
+ct:pal("check_cache",[]),
{keep_state, cache_check_set_idle_timer(D)};
handle_event(info, UnexpectedMessage, StateName, D = #data{ssh_params = Ssh}) ->