|
|
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import static bubble.model.device.FlexRouterPing.MAX_PING_AGE; |
|
|
|
import static java.util.concurrent.TimeUnit.MINUTES; |
|
|
|
import static java.util.concurrent.TimeUnit.SECONDS; |
|
|
|
import static org.cobbzilla.util.daemon.ZillaRuntime.shortError; |
|
|
@@ -32,7 +33,7 @@ public class FlexRouterService extends SimpleDaemon { |
|
|
|
public static final int MAX_PING_TRIES = 5; |
|
|
|
private static final long PING_SLEEP_FACTOR = SECONDS.toMillis(2); |
|
|
|
|
|
|
|
public static final int DEFAULT_PING_TIMEOUT = (int) SECONDS.toMillis(FlexRouterPing.MAX_PING_AGE/2); |
|
|
|
public static final int DEFAULT_PING_TIMEOUT = (int) SECONDS.toMillis(MAX_PING_AGE/2); |
|
|
|
|
|
|
|
public static final RequestConfig DEFAULT_PING_REQUEST_CONFIG = RequestConfig.custom() |
|
|
|
.setConnectTimeout(DEFAULT_PING_TIMEOUT) |
|
|
|