diff --git a/core/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java b/core/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java index c5d8f29e39a..a5542f9b403 100644 --- a/core/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java +++ b/core/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java @@ -287,9 +287,6 @@ public class NettyTransport extends AbstractLifecycleComponent implem this.scheduledPing = new ScheduledPing(); this.pingSchedule = PING_SCHEDULE.get(settings); - if (pingSchedule.millis() > 0) { - threadPool.schedule(pingSchedule, ThreadPool.Names.GENERIC, scheduledPing); - } this.namedWriteableRegistry = namedWriteableRegistry; this.circuitBreakerService = circuitBreakerService; } @@ -366,6 +363,9 @@ public class NettyTransport extends AbstractLifecycleComponent implem bindServerBootstrap(name, mergedSettings); } } + if (pingSchedule.millis() > 0) { + threadPool.schedule(pingSchedule, ThreadPool.Names.GENERIC, scheduledPing); + } success = true; } finally { if (success == false) {