anchor.diff:      S#state{session_in = publish(Msg,S)}.
   
   publish(Msg = #mqtt_message{packet_id = PacketId, qos = Qos},
  -        S = #state{session_in = SessionIn, sender_pid = SenderPid})->
  +        S = #state{session_in = SessionIn, sender_pid = SenderPid}) ->
       NewSessionIn = case Qos of
           0 ->
               mqtt_publish:at_most_once(Msg,SessionIn);
  
positive.code:     Ref = set_keep_alive_timer(TimeOut),
      S#state {keep_alive_ref = Ref,keep_alive_timeout = TimeOut}.
  
  set_keep_alive_timer(Timeout) ->
      timer:send_after(Timeout, keep_alive_timeout).
  
  reset_keep_alive(S = #state{keep_alive_ref = Ref,keep_alive_timeout = TimeOut}) ->
  
  
negative.code: handle_info(connect_timeout, S = #state{connect_state = connecting}) ->
      prevent_connection(S,timeout);
  
  handle_info({keep_alive_timeout,MatchRef}, S = #state{ keep_alive_ref = {_,MatchRef}}) ->
      error_logger:info_msg("Connection timed out ~p",[MatchRef]),
      abort_connection(S,timeout);
  
  handle_info(_Info, State) ->
  