Explorar o código

fix: return error on start hstreamdb crash

Shawn %!s(int64=3) %!d(string=hai) anos
pai
achega
e0a6a61d73

+ 4 - 2
lib-ee/emqx_ee_connector/src/emqx_ee_connector_hstreamdb.erl

@@ -135,13 +135,15 @@ start_client(InstId, Config) ->
         do_start_client(InstId, Config)
     catch
         E:R:S ->
-            ?SLOG(error, #{
+            Error = #{
                 msg => "start hstreamdb connector error",
                 connector => InstId,
                 error => E,
                 reason => R,
                 stack => S
-            })
+            },
+            ?SLOG(error, Error),
+            {error, Error}
     end.
 
 do_start_client(InstId, Config = #{url := Server, pool_size := PoolSize}) ->