fix sup
This commit is contained in:
parent
dab42088f2
commit
21f8edda02
@ -68,9 +68,9 @@ init([]) ->
|
||||
%%% Internal functions
|
||||
%%%===================================================================
|
||||
|
||||
-spec register_service(ServiceId :: binary()) -> {ok, Pid :: pid()} | {error, Reason :: any()}.
|
||||
register_service(ServiceId) when is_binary(ServiceId) ->
|
||||
case supervisor:start_child(?MODULE, child_spec(ServiceId)) of
|
||||
-spec register_service(Service :: #micro_service{}) -> {ok, Pid :: pid()} | {error, Reason :: any()}.
|
||||
register_service(Service) ->
|
||||
case supervisor:start_child(?MODULE, child_spec(Service)) of
|
||||
{ok, Pid} when is_pid(Pid) ->
|
||||
{ok, Pid};
|
||||
{error, {'already_started', Pid}} when is_pid(Pid) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user