diff --git a/src/main/java/com/jd/jdbc/topo/etcd2topo/Etcd2TopoFactory.java b/src/main/java/com/jd/jdbc/topo/etcd2topo/Etcd2TopoFactory.java index 59ec28a..a7e5ec7 100644 --- a/src/main/java/com/jd/jdbc/topo/etcd2topo/Etcd2TopoFactory.java +++ b/src/main/java/com/jd/jdbc/topo/etcd2topo/Etcd2TopoFactory.java @@ -93,6 +93,8 @@ private Etcd2TopoServer newServerWithOpts(String serverAddr, String root, String .keepaliveTimeout(Duration.ofSeconds(10L)) .keepaliveTime(Duration.ofSeconds(10L)) .keepaliveWithoutCalls(true) + .connectTimeout(Duration.ofSeconds(5)) + .waitForReady(false) .executorService(TabletNettyExecutorService.getNettyExecutorService()).build(); Etcd2TopoServer etcd2TopoServer = new Etcd2TopoServer();