feat(quic): quic conn idle_timeout default 1min
This commit is contained in:
parent
4e2e2d5635
commit
b4a9d663ae
|
@ -147,17 +147,17 @@ start_listener(quic, ListenOn, Options) ->
|
|||
quicer_nif:open_lib(),
|
||||
quicer_nif:reg_open(),
|
||||
SSLOpts = proplists:get_value(ssl_options, Options),
|
||||
DefAcceptors = erlang:system_info(schedulers_online) * 8,
|
||||
ListenOpts = [ {cert, proplists:get_value(certfile, SSLOpts)}
|
||||
, {key, proplists:get_value(keyfile, SSLOpts)}
|
||||
, {alpn, ["mqtt"]}
|
||||
, {peer_unidi_stream_count, 1}
|
||||
, {peer_bidi_stream_count, 10}
|
||||
, {conn_acceptors, 32}
|
||||
, {conn_acceptors, proplists:get_value(acceptors, Options, DefAcceptors)}
|
||||
, {idle_timeout_ms, proplists:get_value(idle_timeout, Options, 60000)}
|
||||
],
|
||||
ConnectionOpts = [ {conn_callback, emqx_quic_connection}
|
||||
, {idle_timeout_ms, 5000}
|
||||
, {peer_unidi_stream_count, 1}
|
||||
, {peer_bidi_stream_count, 10}],
|
||||
, {peer_bidi_stream_count, 10}
|
||||
],
|
||||
StreamOpts = [],
|
||||
quicer:start_listener('mqtt:quic', ListenOn, {ListenOpts, ConnectionOpts, StreamOpts}).
|
||||
|
||||
|
|
|
@ -382,6 +382,7 @@ fields("quic_listener_settings") ->
|
|||
[ {"certfile", t(string(), undefined, undefined)}
|
||||
, {"keyfile", t(string(), undefined, undefined)}
|
||||
, {"ciphers", t(comma_separated_list(), undefined, "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_CHACHA20_POLY1305_SHA256")}
|
||||
, {"idle_timeout", t(duration(), undefined, 60000)}
|
||||
| fields("listener_settings")],
|
||||
Unsupported);
|
||||
|
||||
|
|
Loading…
Reference in New Issue