chore(dashboard): warning wehn stop dashboard listener not found.
This commit is contained in:
parent
ec5d1b1463
commit
8041524d20
|
@ -80,8 +80,12 @@ start_listeners() ->
|
|||
|
||||
stop_listeners() ->
|
||||
[begin
|
||||
_ = minirest:stop(Name),
|
||||
?ULOG("Stop listener ~ts on ~p successfully.~n", [Name, Port])
|
||||
case minirest:stop(Name) of
|
||||
ok ->
|
||||
?ULOG("Stop listener ~ts on ~p successfully.~n", [Name, Port]);
|
||||
{error, not_found} ->
|
||||
?SLOG(warning, #{msg => "stop_listener_failed", name => Name, port => Port})
|
||||
end
|
||||
end || {Name, _, Port, _} <- listeners()].
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
|
|
|
@ -29,8 +29,8 @@ fields("dashboard") ->
|
|||
sc(hoconsc:array(hoconsc:union([hoconsc:ref(?MODULE, "http"),
|
||||
hoconsc:ref(?MODULE, "https")])),
|
||||
#{ desc =>
|
||||
"""HTTP(s) listeners identified by their protocol type,
|
||||
is used to serve dashboard UI and restful HTTP API.<br>
|
||||
"""HTTP(s) listeners are identified by their protocol type and are
|
||||
used to serve dashboard UI and restful HTTP API.<br>
|
||||
Listeners must have a unique combination of port number and IP address.<br>
|
||||
For example, an HTTP listener can listen on all configured IP addresses
|
||||
on a given port for a machine by specifying the IP address 0.0.0.0.<br>
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -48,7 +48,7 @@ defmodule EMQXUmbrella.MixProject do
|
|||
{:mria, github: "emqx/mria", tag: "0.1.5", override: true},
|
||||
{:ekka, github: "emqx/ekka", tag: "0.11.3", override: true},
|
||||
{:gen_rpc, github: "emqx/gen_rpc", tag: "2.8.0", override: true},
|
||||
{:minirest, github: "emqx/minirest", tag: "1.2.10", override: true},
|
||||
{:minirest, github: "emqx/minirest", tag: "1.2.11", override: true},
|
||||
{:ecpool, github: "emqx/ecpool", tag: "0.5.2"},
|
||||
{:replayq, "0.3.3", override: true},
|
||||
{:pbkdf2, github: "emqx/erlang-pbkdf2", tag: "2.0.4", override: true},
|
||||
|
|
Loading…
Reference in New Issue