This commit is contained in:
anlicheng 2025-04-30 17:34:42 +08:00
parent c21ce9f239
commit 145582a37b

View File

@ -145,7 +145,8 @@ handle_call(start_service, _From, State = #state{running_status = ?STATUS_STOPPE
end; end;
%% , status字段 %% , status字段
handle_call(stop_service, _From, State = #state{running_status = ?STATUS_STOPPED}) -> handle_call(stop_service, _From, State = #state{running_status = ?STATUS_STOPPED, port = Port, os_pid = OSPid}) ->
lager:debug("stop service port: ~p, os_pid: ~p", [Port, OSPid]),
{reply, {error, <<"service not running">>}, State}; {reply, {error, <<"service not running">>}, State};
handle_call(stop_service, _From, State = #state{running_status = ?STATUS_RUNNING, port = Port, os_pid = OSPid, service = Service = #micro_service{service_id = ServiceId}}) when is_port(Port) -> handle_call(stop_service, _From, State = #state{running_status = ?STATUS_RUNNING, port = Port, os_pid = OSPid, service = Service = #micro_service{service_id = ServiceId}}) when is_port(Port) ->