|
|
@@ -47,7 +47,7 @@ public class FlexRouterService extends SimpleDaemon { |
|
|
|
|
|
|
|
public static boolean pingFlexRouter(FlexRouter router) { |
|
|
|
final String prefix = "pingRouter(" + router + "): "; |
|
|
|
final HttpRequestBean request = new HttpRequestBean(POST, router.pingUrl(), json(router.pingObject())); |
|
|
|
final HttpRequestBean request = new HttpRequestBean(POST, router.pingUrl()); |
|
|
|
for (int i=0; i<MAX_PING_TRIES; i++) { |
|
|
|
sleep(PING_SLEEP_FACTOR * i, "waiting to ping flexRouter"); |
|
|
|
if (i == 0) { |
|
|
@@ -56,6 +56,7 @@ public class FlexRouterService extends SimpleDaemon { |
|
|
|
if (log.isWarnEnabled()) log.warn(prefix+"attempting to ping again (try="+(i+1)+"/"+MAX_PING_TRIES+")"); |
|
|
|
} |
|
|
|
try { |
|
|
|
request.setEntity(json(router.pingObject())); |
|
|
|
final HttpResponseBean response = HttpUtil.getResponse(request); |
|
|
|
if (!response.isOk()) { |
|
|
|
log.error(prefix+"response not OK: "+response); |
|
|
|