fix
This commit is contained in:
parent
b5717b1f78
commit
b68e1489dd
@ -102,7 +102,7 @@ make_assoc(Pid) when is_pid(Pid) ->
|
||||
|
||||
%% 激活主机, true 表示激活; false表示关闭激活
|
||||
-spec activate(Pid :: pid(), Auth :: boolean()) -> ok.
|
||||
activate(Pid, Auth) when is_pid(Pid), is_binary(Auth) ->
|
||||
activate(Pid, Auth) when is_pid(Pid), is_boolean(Auth) ->
|
||||
gen_server:call(Pid, {activate, Auth}).
|
||||
|
||||
-spec get_metric(Pid :: pid()) -> {ok, MetricInfo :: map()}.
|
||||
@ -152,8 +152,10 @@ init([UUID]) ->
|
||||
{noreply, NewState :: #state{}, timeout() | hibernate} |
|
||||
{stop, Reason :: term(), Reply :: term(), NewState :: #state{}} |
|
||||
{stop, Reason :: term(), NewState :: #state{}}).
|
||||
handle_call(get_metric, _From, State = #state{metrics = Metrics}) ->
|
||||
handle_call(get_metric, _From, State = #state{metrics = Metrics, has_session = true}) ->
|
||||
{reply, {ok, Metrics}, State};
|
||||
handle_call(get_metric, _From, State) ->
|
||||
{reply, {ok, #{}}, State};
|
||||
|
||||
handle_call(get_aes, _From, State = #state{aes = Aes}) ->
|
||||
{reply, {ok, Aes}, State};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user