anchor.diff:  parse_specific_type(?PUBLISH,<<Dup:1,QoS:2,Retain:1>>,S) when QoS =< 2 ->
   
       %% validate flags - @todo: should we do that here? or in the connection process???
  -    case {Dup,QoS,Retain} of
  -        {1,0,_}->
  -            throw({error,invalid_flags});
  -        _ ->
  -            ok
  +    case {Dup,QoS} of
  +        {1,0} -> throw({error,invalid_flags});
  +        _     -> ok
       end,
   
       %#parse_state{buffer = Rest } = S,
  
positive.code:     KeepAlive:16,
      Payload/binary>>}) ->
  
      {ok,ClientId, Rest} = parse_string(S#parse_state{buffer=Payload}), %% 3.1.3.1 does not place strict limitations on the ClientId
      {ok, WillDetails,Rest3} = maybe_parse_will_details(WillFlag,WillRetain,WillQoS,Rest),
      {Username,Rest4} = maybe_parse_string(UsernameFlag,Rest3),
      {Password,<<>>} =  maybe_parse_string(PasswordFlag,Rest4),
      #'CONNECT'{
          protocol_name = ProtocolName,
          protocol_version = ProtocolLevel,
  
negative.code: 
  %% Insufficient data in Buffer
  parse_packet_unsafe(S)->
      parse_packet_unsafe(read(S)).
  
  %% ========================================================
  %% CONNECT -- COMPLETE!!!
  