catch topic_alias_invalid reasoncode
This commit is contained in:
parent
876a983e93
commit
9189d4ff41
|
@ -312,9 +312,12 @@ process_packet(Packet = ?PUBLISH_PACKET(?QOS_0, Topic, _PacketId, _Payload), PSt
|
||||||
case check_publish(Packet, PState) of
|
case check_publish(Packet, PState) of
|
||||||
{ok, PState1} ->
|
{ok, PState1} ->
|
||||||
do_publish(Packet, PState1);
|
do_publish(Packet, PState1);
|
||||||
|
{error, ?RC_TOPIC_ALIAS_INVALID} ->
|
||||||
|
?LOG(error, "Protocol error - ~p", [?RC_TOPIC_ALIAS_INVALID], PState),
|
||||||
|
{error, ?RC_TOPIC_ALIAS_INVALID, PState};
|
||||||
{error, ReasonCode} ->
|
{error, ReasonCode} ->
|
||||||
?LOG(warning, "Cannot publish qos0 message to ~s for ~s", [Topic, ReasonCode], PState),
|
?LOG(warning, "Cannot publish qos0 message to ~s for ~s", [Topic, ReasonCode], PState),
|
||||||
{ok, PState}
|
{error, ReasonCode, PState}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
process_packet(Packet = ?PUBLISH_PACKET(?QOS_1, PacketId), PState) ->
|
process_packet(Packet = ?PUBLISH_PACKET(?QOS_1, PacketId), PState) ->
|
||||||
|
|
Loading…
Reference in New Issue