diff --git a/apps/iot/src/iot_host_sup.erl b/apps/iot/src/iot_host_sup.erl index 9b12b06..4762613 100644 --- a/apps/iot/src/iot_host_sup.erl +++ b/apps/iot/src/iot_host_sup.erl @@ -23,6 +23,8 @@ init([]) -> ensured_host_started(UUID) when is_binary(UUID) -> case iot_host:get_pid(UUID) of undefined -> + %% 尝试删除下host对应的信息 + delete_host(UUID), case supervisor:start_child(?MODULE, child_spec(UUID)) of {ok, Pid} when is_pid(Pid) -> {ok, Pid};