support also ping.timeout in zen disco, and add it to the sample config

This commit is contained in:
kimchy 2011-07-08 02:03:09 +03:00
parent 6783b7fe18
commit 9be62a06e9
2 changed files with 3 additions and 2 deletions

View File

@ -24,5 +24,6 @@
# Unicast Discovery (disable multicast)
#discovery:
# zen:
# ping.timeout: 3s
# ping.multicast.enabled: false
# ping.unicast.hosts: ["host1", "host2"]

View File

@ -118,10 +118,10 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
this.pingService = pingService;
// also support direct discovery.zen settings, for cases when it gets extended
this.pingTimeout = settings.getAsTime("discovery.zen.ping_timeout", componentSettings.getAsTime("ping_timeout", componentSettings.getAsTime("initial_ping_timeout", timeValueSeconds(3))));
this.pingTimeout = settings.getAsTime("discovery.zen.ping.timeout", settings.getAsTime("discovery.zen.ping_timeout", componentSettings.getAsTime("ping_timeout", componentSettings.getAsTime("initial_ping_timeout", timeValueSeconds(3)))));
this.sendLeaveRequest = componentSettings.getAsBoolean("send_leave_request", true);
logger.debug("using ping_timeout [{}]", pingTimeout);
logger.debug("using ping.timeout [{}]", pingTimeout);
this.electMaster = new ElectMasterService(settings);