anchor.diff:  	  connection_state                      :: #connection{},
   	  latest_channel_id         = 0         :: non_neg_integer()
                                                    | undefined,
  -	  idle_timer_ref                        :: undefined 
  -						 | infinity
  -						 | reference(),
  -	  idle_timer_value          = infinity  :: infinity
  -						 | pos_integer(),
   	  transport_protocol                    :: atom()
                                                    | undefined,	% ex: tcp
   	  transport_cb                          :: atom()
  
positive.code: %%% Cache idle timer that closes the connection if there are no
  %%% channels open for a while.
  
  cache_init_idle_timer(D) ->
      case ?GET_OPT(idle_time, (D#data.ssh_params)#ssh.opts) of
  	infinity ->
  	    D#data{idle_timer_value = infinity,
  		   idle_timer_ref = infinity	% A flag used later...
  		  };
  	IdleTime ->
  	    %% We dont want to set the timeout on first connect
  	    D#data{idle_timer_value = IdleTime}
      end.
  
  
  cache_check_set_idle_timer(D = #data{idle_timer_ref = undefined,
  				     idle_timer_value = IdleTime}) ->
      %% No timer set - shall we set one?
      case ssh_client_channel:cache_info(num_entries, cache(D)) of
  	0 when IdleTime == infinity ->
  	    %% No. Meaningless to set a timer that fires in an infinite time...
  	    D;
  	0 ->
  	    %% 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(), idle_timer_timeout)};
  	_ ->
  	    %% No - there are entries in the cache
  	    D
      end;
  cache_check_set_idle_timer(D) ->
      %% There is already a timer set or the timeout time is infinite
      D.
      
  
  cache_cancel_idle_timer(D) ->
      case D#data.idle_timer_ref of
  	infinity -> 
  	    %% The timer is not activated
  	    D;
  	undefined ->
  	    %% The timer is already cancelled
  	    D;
  	TimerRef -> 
  	    %% The timer is active
  	    erlang:cancel_timer(TimerRef),
  	    D#data{idle_timer_ref = undefined}
      end.
  
  
  cache_request_idle_timer_check(D = #data{idle_timer_value = infinity}) ->
      D;
  cache_request_idle_timer_check(D = #data{idle_timer_value = IdleTime}) ->
      erlang:send_after(IdleTime, self(), check_cache),
      D.
  
  %%%----------------------------------------------------------------
  start_channel_request_timer(_,_, infinity) ->
  
negative.code: 			{ConnReplies, NonConnReplies} = lists:splitwith(fun not_connected_filter/1, Replies),
  			send_replies(NonConnReplies, D0#data{event_queue = Qev0 ++ ConnReplies})
  		end,
              case {Msg, StateName} of
                  {#ssh_msg_channel_close{}, {connected,_}} ->
                      {keep_state, D, [cond_set_idle_timer(D)|Repls]};
                  {#ssh_msg_channel_success{}, _} ->
                      update_inet_buffers(D#data.socket),
                      {keep_state, D, Repls};
                  _ ->
  