mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-26 08:07:27 -04:00
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
1 changed files with 3 additions and 3 deletions
|
@ -287,9 +287,6 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
||||||
|
|
||||||
this.scheduledPing = new ScheduledPing();
|
this.scheduledPing = new ScheduledPing();
|
||||||
this.pingSchedule = PING_SCHEDULE.get(settings);
|
this.pingSchedule = PING_SCHEDULE.get(settings);
|
||||||
if (pingSchedule.millis() > 0) {
|
|
||||||
threadPool.schedule(pingSchedule, ThreadPool.Names.GENERIC, scheduledPing);
|
|
||||||
}
|
|
||||||
this.namedWriteableRegistry = namedWriteableRegistry;
|
this.namedWriteableRegistry = namedWriteableRegistry;
|
||||||
this.circuitBreakerService = circuitBreakerService;
|
this.circuitBreakerService = circuitBreakerService;
|
||||||
}
|
}
|
||||||
|
@ -366,6 +363,9 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
||||||
bindServerBootstrap(name, mergedSettings);
|
bindServerBootstrap(name, mergedSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pingSchedule.millis() > 0) {
|
||||||
|
threadPool.schedule(pingSchedule, ThreadPool.Names.GENERIC, scheduledPing);
|
||||||
|
}
|
||||||
success = true;
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
if (success == false) {
|
if (success == false) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue