fix(emqx_connector): don't return error when stopping a non-existing pool

This commit is contained in:
Shawn 2021-06-02 18:41:48 +08:00
parent 49c5edce2e
commit ebe1228b2c
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ start_pool(Name, Mod, Options) ->
stop_pool(Name) -> stop_pool(Name) ->
case ecpool:stop_sup_pool(Name) of case ecpool:stop_sup_pool(Name) of
ok -> logger:log(info, "Destroyed ~0p Successfully", [Name]); ok -> logger:log(info, "Destroyed ~0p Successfully", [Name]);
{error, not_found} -> ok;
{error, Reason} -> {error, Reason} ->
logger:log(error, "Destroy ~0p failed, ~0p", [Name, Reason]), logger:log(error, "Destroy ~0p failed, ~0p", [Name, Reason]),
error({stop_pool_failed, Name}) error({stop_pool_failed, Name})