firest 2 anni fa
parent
commit
804443ba40

+ 1 - 1
apps/emqx/src/emqx_frame.erl

@@ -473,7 +473,7 @@ parse_packet(
     {Properties, <<>>} = parse_properties(Rest, ?MQTT_PROTO_V5, StrictMode),
     #mqtt_packet_auth{reason_code = ReasonCode, properties = Properties};
 parse_packet(Header, _FrameBin, _Options) ->
-    ?PARSE_ERR(#{hit => malformed_packet, header_type => Header#mqtt_packet_header.type}).
+    ?PARSE_ERR(#{hint => malformed_packet, header_type => Header#mqtt_packet_header.type}).
 
 parse_will_message(
     Packet = #mqtt_packet_connect{

+ 1 - 1
apps/emqx/test/emqx_ws_connection_SUITE.erl

@@ -546,7 +546,7 @@ t_parse_incoming_frame_error(_) ->
             {incoming,
                 {frame_error, #{
                     header_type := _,
-                    hit := malformed_packet
+                    hint := malformed_packet
                 }}}
         ],
         Packets

+ 1 - 1
changes/ce/perf-11532.en.md

@@ -1 +1 @@
-Improve some error reasons for parsing with invalid packets.
+Improve some error reasons when parsing invalid packets.