feat(quic): reload quicer lib before start listener
This commit is contained in:
parent
14057c033d
commit
e062be2b0e
|
@ -49,9 +49,6 @@ start(_Type, _Args) ->
|
||||||
ok = emqx_plugins:init(),
|
ok = emqx_plugins:init(),
|
||||||
_ = emqx_plugins:load(),
|
_ = emqx_plugins:load(),
|
||||||
_ = start_ce_modules(),
|
_ = start_ce_modules(),
|
||||||
%% @fixme unsure why we need this.
|
|
||||||
quicer_nif:open_lib(),
|
|
||||||
quicer_nif:reg_open(),
|
|
||||||
emqx_boot:is_enabled(listeners) andalso (ok = emqx_listeners:start()),
|
emqx_boot:is_enabled(listeners) andalso (ok = emqx_listeners:start()),
|
||||||
register(emqx, self()),
|
register(emqx, self()),
|
||||||
ok = emqx_alarm_handler:load(),
|
ok = emqx_alarm_handler:load(),
|
||||||
|
|
|
@ -143,6 +143,9 @@ start_listener(Proto, ListenOn, Options) when Proto == https; Proto == wss ->
|
||||||
|
|
||||||
%% Start MQTT/QUIC listener
|
%% Start MQTT/QUIC listener
|
||||||
start_listener(quic, ListenOn, Options) ->
|
start_listener(quic, ListenOn, Options) ->
|
||||||
|
%% @fixme unsure why we need reopen lib and reopen config.
|
||||||
|
quicer_nif:open_lib(),
|
||||||
|
quicer_nif:reg_open(),
|
||||||
SSLOpts = proplists:get_value(ssl_options, Options),
|
SSLOpts = proplists:get_value(ssl_options, Options),
|
||||||
ListenOpts = [ {cert, proplists:get_value(certfile, SSLOpts)}
|
ListenOpts = [ {cert, proplists:get_value(certfile, SSLOpts)}
|
||||||
, {key, proplists:get_value(keyfile, SSLOpts)}
|
, {key, proplists:get_value(keyfile, SSLOpts)}
|
||||||
|
|
|
@ -28,6 +28,7 @@ all() -> emqx_ct:all(?MODULE).
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
NewConfig = generate_config(),
|
NewConfig = generate_config(),
|
||||||
application:ensure_all_started(esockd),
|
application:ensure_all_started(esockd),
|
||||||
|
application:ensure_all_started(quicer),
|
||||||
application:ensure_all_started(cowboy),
|
application:ensure_all_started(cowboy),
|
||||||
lists:foreach(fun set_app_env/1, NewConfig),
|
lists:foreach(fun set_app_env/1, NewConfig),
|
||||||
Config.
|
Config.
|
||||||
|
|
Loading…
Reference in New Issue