Do not start scheduled pings until transport start
Today, scheduled pings in NettyTransport can start before the transport is started. Instead, these pings should not be scheduled until after the transport is started. This commit modifies NettyTransport so that this is the case. Relates #18702
This commit is contained in:
parent
b6f26c0c37
commit
f67e5807ca
|
@ -287,9 +287,6 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> 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<Transport> implem
|
|||
bindServerBootstrap(name, mergedSettings);
|
||||
}
|
||||
}
|
||||
if (pingSchedule.millis() > 0) {
|
||||
threadPool.schedule(pingSchedule, ThreadPool.Names.GENERIC, scheduledPing);
|
||||
}
|
||||
success = true;
|
||||
} finally {
|
||||
if (success == false) {
|
||||
|
|
Loading…
Reference in New Issue