anchor.diff:  
       mqtt_message_worker:ack(Worker, self(), Msg),
   
  -    {reply, undefined, connected, StateData, round(Ka*1.5)};
  +    {reply, undefined, connected, StateData, Ka};
   
   %TODO: prevent subscribing multiple times to the same topic
   connected(#mqtt_msg{type='SUBSCRIBE', payload=P}, _, StateData=#session{topics=T, keepalive=Ka}) ->
  
positive.code:     end,
  
      Resp = #mqtt_msg{type='CONNACK', payload=[{retcode, Retcode}]},
      {reply, Resp, NextState, StateData#session{deviceid=DeviceID, keepalive=KeepAlive, opts=Vals, topics=Topics}, round(KeepAlive*1.5)};
  initiate(#mqtt_msg{}, _, _StateData) ->
  	% close socket
  	{stop, disconnect, []};
  
negative.code: 
      mqtt_message_worker:ack(Worker, self(), Msg),
  
      {reply, undefined, connected, StateData, Ka};
  
  connected(Msg=#mqtt_msg{type='PUBREC', payload=P}, _, StateData=#session{keepalive=Ka,inflight=Inflight}) ->
      MsgID  = proplists:get_value(msgid, P),
  