anchor.diff:          {ok, {Msg, TRef}} ->
               cancel_timer(TRef),
               emqttd_pubsub:publish(Msg),
  -            {noreply, Session#session{awaiting_rel = maps:remove(PktId, AwaitingRel)}};
  +            noreply(Session#session{awaiting_rel = maps:remove(PktId, AwaitingRel)});
           error ->
               lager:error("Session ~s cannot find PUBREL: pktid=~p!", [ClientId, PktId]),
  -            {noreply, Session}
  +            noreply(Session)
       end;
   
   %% PUBCOMP
  
positive.code: handle_info({dispatch, Msg}, Session = #session{client_pid = undefined,
                                                  message_queue = Q})
      when is_record(Msg, mqtt_message) ->
      {noreply, Session#session{message_queue = emqttd_mqueue:in(Msg, Q)}};
  
  %% Dispatch qos0 message directly to client
  handle_info({dispatch, Msg = #mqtt_message{qos = ?QOS_0}},
              Session = #session{client_pid = ClientPid}) ->
      ClientPid ! {deliver, Msg},
      {noreply, Session};
  
  handle_info({dispatch, Msg = #mqtt_message{qos = QoS}},
              Session = #session{client_id = ClientId, message_queue = MsgQ})
  
negative.code:         end, Session1, lists:reverse(InflightQ)),
  
      %% Dequeue pending messages
      noreply(dequeue(Session2));
  
  %% PUBRAC
  handle_cast({puback, PktId}, Session = #session{client_id = ClientId, awaiting_ack = Awaiting}) ->
  