Zond: всё брать из конфига напрямую
This commit is contained in:
@@ -110,9 +110,8 @@ public class ZondCommandHandler implements CommandHandler {
|
|||||||
|
|
||||||
executor.setWatchdog(watchdog);
|
executor.setWatchdog(watchdog);
|
||||||
}
|
}
|
||||||
int delay = Config.getInstance().getInt("pingmonitor.delay");
|
|
||||||
pingMonitor = new PingMonitor(
|
pingMonitor = new PingMonitor(
|
||||||
delay,
|
Config.getInstance().getInt("pingmonitor.delay"),
|
||||||
Config.getInstance().getInt("bridge.second"),
|
Config.getInstance().getInt("bridge.second"),
|
||||||
Config.getInstance().getInt("pingmonitor.maxlost")
|
Config.getInstance().getInt("pingmonitor.maxlost")
|
||||||
);
|
);
|
||||||
@@ -130,7 +129,7 @@ public class ZondCommandHandler implements CommandHandler {
|
|||||||
server.setPingMonitor(pingMonitor);
|
server.setPingMonitor(pingMonitor);
|
||||||
server.start(Config.getInstance().getInt("bridge.port"));
|
server.start(Config.getInstance().getInt("bridge.port"));
|
||||||
|
|
||||||
deadTime = (System.currentTimeMillis()/1000) + (delay*1000);
|
deadTime = (System.currentTimeMillis()/1000) + (Config.getInstance().getInt("pingmonitor.delay")*1000);
|
||||||
Runnable callback;
|
Runnable callback;
|
||||||
if (flagTicker) {
|
if (flagTicker) {
|
||||||
callback = () -> {
|
callback = () -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user