perf(emqx_frame): skip empty tail
This commit is contained in:
parent
9d0ef5de6b
commit
fec3c6574e
|
@ -174,6 +174,7 @@ parse_remaining_len(<<0:1, Len:7, Rest/binary>>, Header, Multiplier, Value,
|
||||||
body_bytes(B) when is_binary(B) -> size(B);
|
body_bytes(B) when is_binary(B) -> size(B);
|
||||||
body_bytes(?Q(Bytes, _)) -> Bytes.
|
body_bytes(?Q(Bytes, _)) -> Bytes.
|
||||||
|
|
||||||
|
append_body(H, <<>>) -> H;
|
||||||
append_body(H, T) when is_binary(H) andalso size(H) < 1024 ->
|
append_body(H, T) when is_binary(H) andalso size(H) < 1024 ->
|
||||||
<<H/binary, T/binary>>;
|
<<H/binary, T/binary>>;
|
||||||
append_body(H, T) when is_binary(H) ->
|
append_body(H, T) when is_binary(H) ->
|
||||||
|
|
Loading…
Reference in New Issue