Преглед изворни кода

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).