chore(mqttsn): fix frame formating crash

This commit is contained in:
JianBo He 2022-03-08 17:21:56 +08:00
parent 8ac0152af0
commit 01eb3ca93a
1 changed files with 2 additions and 2 deletions

View File

@ -362,9 +362,9 @@ format(?SN_REGACK_MSG(TopicId, MsgId, ReturnCode)) ->
format(?SN_PINGREQ_MSG(ClientId)) -> format(?SN_PINGREQ_MSG(ClientId)) ->
io_lib:format("SN_PINGREQ(ClientId=~s)", [ClientId]); io_lib:format("SN_PINGREQ(ClientId=~s)", [ClientId]);
format(?SN_PINGRESP_MSG()) -> format(?SN_PINGRESP_MSG()) ->
"SN_PINGREQ()"; "SN_PINGRESP()";
format(?SN_DISCONNECT_MSG(Duration)) -> format(?SN_DISCONNECT_MSG(Duration)) ->
io_lib:format("SN_DISCONNECT(Duration=~s)", [Duration]); io_lib:format("SN_DISCONNECT(Duration=~w)", [Duration]);
format(#mqtt_sn_message{type = Type, variable = Var}) -> format(#mqtt_sn_message{type = Type, variable = Var}) ->
io_lib:format("mqtt_sn_message(type=~s, Var=~w)", io_lib:format("mqtt_sn_message(type=~s, Var=~w)",