فهرست منبع

chore: adds auto_reconnect for ecpool

Dennis Zhuang 2 سال پیش
والد
کامیت
cd9d5f287e
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl

+ 3 - 0
apps/emqx_bridge_greptimedb/src/emqx_bridge_greptimedb_connector.erl

@@ -51,6 +51,8 @@
 
 -define(DEFAULT_TIMESTAMP_TMPL, "${timestamp}").
 
+-define(AUTO_RECONNECT_S, 1).
+
 %% -------------------------------------------------------------------------------------------------
 %% resource callback
 callback_mode() -> always_sync.
@@ -261,6 +263,7 @@ client_config(
         {pool_size, erlang:system_info(schedulers)},
         {pool, InstId},
         {pool_type, random},
+        {auto_reconnect, ?AUTO_RECONNECT_S},
         {timeunit, maps:get(precision, Config, ms)}
     ] ++ protocol_config(Config).