anchor.diff:          {NextStateName, NewState} ->
               {next_state, NextStateName, NewState, ?CLOSE_AFTER};
           Ret -> Ret
  -    end.
  +    end;
  +handle_event(disconnect, StateName, State) ->
  +    lager:warning("[~p] stop in state ~p due to ~p~n", [self(), StateName, disconnect]),
  +    {stop, normal, State}.
   
   -spec handle_sync_event(_, _, _, #state{}) -> {reply, _, statename(), #state{}} | {stop, {error, {unknown_req, _}}, #state{}}.
   handle_sync_event({get_info, Items}, _From, StateName, State) ->
  
positive.code: 
  -spec disconnect(pid()) -> ok.
  disconnect(FsmPid) ->
      gen_fsm:send_event(FsmPid, disconnect).
  
  -spec in(pid(), #mqtt_frame{}) ->  ok.
  in(FsmPid, Event) ->
  
negative.code:     {next_state, wait_for_connect, State, ?CLOSE_AFTER}.
  
  -spec connected(timeout
                  | keepalive_expired
                  | {retry, msg_id()}
                  | {deliver_bin, {msg_id(), qos(), payload()}}
  