Skip to content

Commit

Permalink
feat: consider mqtt valid packet type in gen_tcp_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
keynslug committed Nov 27, 2024
1 parent c05cb81 commit 6d775b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/kernel/src/gen_tcp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,8 @@ module_socket(#params{socket = Socket}) ->

%% -type packet_option_value() ::
%% 0 | 1 | 2 | 4 | raw | sunrm | asn1 |
%% cdr | fcgi | line | tpkt | http | httph | http_bin | httph_bin.
%% cdr | fcgi | line | tpkt | mqtt | http | httph | http_bin |
%% httph_bin.

-compile({inline, [is_packet_option_value/1]}).
is_packet_option_value(Value) ->
Expand All @@ -1650,6 +1651,7 @@ is_packet_option_value(Value) ->
fcgi -> true;
line -> true;
tpkt -> true;
mqtt -> true;
http -> true;
httph -> true;
http_bin -> true;
Expand Down

0 comments on commit 6d775b0

Please sign in to comment.