anchor.diff:  % PUBCOMP (QOS=2)
   connected({ack, MsgID, _Qos=2}, StateData=#session{transport={Callback,Transport,Socket},keepalive=Ka}) ->
       lager:debug("sending PUBCOMP"),
  -    Msg = #mqtt_msg{type='PUBCOMP', qos=2, payload=[{msgid, MsgID}]},
  +    Msg = #mqtt_msg{type='PUBCOMP', qos=0, payload=[{msgid, MsgID}]},
       case Callback:send(Transport, Socket, Msg) of
           {error, _} ->
               {stop, normal};
  
positive.code: %
  connected({provreq, MsgID}, StateData=#session{transport={Clb,Transport,Sock},keepalive=Ka}) ->
      lager:debug("sending PUBREC"),
      Msg = #mqtt_msg{type='PUBREC', qos=2, payload=[{msgid, MsgID}]},
      case Clb:send(Transport, Sock, Msg) of
          {error, _} ->
              {stop, normal};
  
negative.code: %
  connected({ack, MsgID, _Qos=1}, StateData=#session{transport={Callback,Transport,Socket},keepalive=Ka}) ->
      lager:debug("sending PUBACK"),
      Msg = #mqtt_msg{type='PUBACK', qos=0, payload=[{msgid, MsgID}]},
      case Callback:send(Transport, Socket, Msg) of
          {error, _} ->
              {stop, normal};
  