chore: gitignore erlang_ls.config
This commit is contained in:
parent
7521d09079
commit
de387c4c8e
|
@ -124,7 +124,7 @@ export EMQX_ZONE__EXTERNAL__SERVER_KEEPALIVE=60
|
|||
export EMQX_MQTT__MAX_TOPIC_ALIAS=10
|
||||
EOF
|
||||
## for ARM, due to CI env issue, skip start of quic listener for the moment
|
||||
[[ $(arch) == *arm* || $(arch) == aarch64 ]] && tee tee -a "$emqx_env_vars" <<EOF
|
||||
[[ $(arch) == *arm* || $(arch) == aarch64 ]] && tee -a "$emqx_env_vars" <<EOF
|
||||
export EMQX_ZONES__DEFAULT__LISTENERS__MQTT_QUIC__ENABLED=false
|
||||
EOF
|
||||
else
|
||||
|
|
|
@ -48,3 +48,5 @@ scripts/git-token
|
|||
apps/*/etc/*.all
|
||||
_upgrade_base/
|
||||
TAGS
|
||||
erlang_ls.config
|
||||
.els_cache/
|
||||
|
|
|
@ -45,9 +45,10 @@ start_listener(ListenerId) ->
|
|||
-spec start_listener(atom(), atom(), map()) -> ok | {error, term()}.
|
||||
start_listener(ZoneName, ListenerName, #{type := Type, bind := Bind} = Conf) ->
|
||||
case do_start_listener(ZoneName, ListenerName, Conf) of
|
||||
{error, listener_disabled} ->
|
||||
console_print("- Skip - starting ~s listener ~s on ~s ~n",
|
||||
[Type, listener_id(ZoneName, ListenerName), format(Bind)]);
|
||||
{ok, {skipped, Reason}} when Reason =:= listener_disabled;
|
||||
Reason =:= quic_app_missing ->
|
||||
console_print("- Skip - starting ~s listener ~s on ~s ~n due to ~p",
|
||||
[Type, listener_id(ZoneName, ListenerName), format(Bind), Reason]);
|
||||
{ok, _} ->
|
||||
console_print("Start ~s listener ~s on ~s successfully.~n",
|
||||
[Type, listener_id(ZoneName, ListenerName), format(Bind)]);
|
||||
|
@ -68,7 +69,7 @@ console_print(_Fmt, _Args) -> ok.
|
|||
-spec(do_start_listener(atom(), atom(), map())
|
||||
-> {ok, pid() | {skipped, atom()}} | {error, term()}).
|
||||
do_start_listener(_ZoneName, _ListenerName, #{enabled := false}) ->
|
||||
{error, listener_disabled};
|
||||
{ok, {skipped, listener_disabled}};
|
||||
do_start_listener(ZoneName, ListenerName, #{type := tcp, bind := ListenOn} = Opts) ->
|
||||
esockd:open(listener_id(ZoneName, ListenerName), ListenOn, merge_default(esockd_opts(Opts)),
|
||||
{emqx_connection, start_link,
|
||||
|
@ -88,6 +89,8 @@ do_start_listener(ZoneName, ListenerName, #{type := ws, bind := ListenOn} = Opts
|
|||
|
||||
%% Start MQTT/QUIC listener
|
||||
do_start_listener(ZoneName, ListenerName, #{type := quic, bind := ListenOn} = Opts) ->
|
||||
case [ A || {quicer, _, _} = A<-application:which_applications() ] of
|
||||
[_] ->
|
||||
%% @fixme unsure why we need reopen lib and reopen config.
|
||||
quicer_nif:open_lib(),
|
||||
quicer_nif:reg_open(),
|
||||
|
@ -106,7 +109,10 @@ do_start_listener(ZoneName, ListenerName, #{type := quic, bind := ListenOn} = Op
|
|||
},
|
||||
StreamOpts = [],
|
||||
quicer:start_listener(listener_id(ZoneName, ListenerName),
|
||||
port(ListenOn), {ListenOpts, ConnectionOpts, StreamOpts}).
|
||||
port(ListenOn), {ListenOpts, ConnectionOpts, StreamOpts});
|
||||
[] ->
|
||||
{ok, {skipped, quic_app_missing}}
|
||||
end.
|
||||
|
||||
esockd_opts(Opts0) ->
|
||||
Opts1 = maps:with([acceptors, max_connections, proxy_protocol, proxy_protocol_timeout], Opts0),
|
||||
|
|
Loading…
Reference in New Issue