修复单位不统一导致的bug

hdrplus
Matthew 11 months ago
parent ace901adc3
commit a3342c29b2

@ -93,7 +93,7 @@ public class MpMasterService extends Service {
private static int mStateService = STATE_SERVICE.NOT_CONNECTED;
private int mMpHeartbeatDuration = 10; // Unit: minute
private long mMpHeartbeatDuration = 600000; // = 10minutes Unit: millssecond
private boolean mMntnMode = false;
private boolean mQuickHbMode = false;
@ -472,7 +472,7 @@ public class MpMasterService extends Service {
MicroPhotoContext.AppConfig appConfig = MicroPhotoContext.getMpAppConfig(getApplicationContext());
if (appConfig.heartbeat > 0) {
mMpHeartbeatDuration = appConfig.heartbeat;
mMpHeartbeatDuration = appConfig.heartbeat * 60000;
}
logger.warning("Start Mntn report: " + masterUrl + " MntnMode=" + (mMntnMode ? "1" : "0") + " QuickHB=" + (mQuickHbMode ? "1" : "0"));
@ -512,7 +512,7 @@ public class MpMasterService extends Service {
mService.mPreviousMpHbTime = System.currentTimeMillis();
if (intent.hasExtra("HeartbeatDuration")) {
mService.mMpHeartbeatDuration = intent.getIntExtra("HeartbeatDuration", 10);
mService.mMpHeartbeatDuration = intent.getIntExtra("HeartbeatDuration", 600000);
}
mService.logger.info("Heartbeat Timer Fired By MpAPP ACTION=" + action);
@ -632,9 +632,9 @@ public class MpMasterService extends Service {
}
}
if (zeroPoint + closestTime * 1000 > currentTimeMs + mMpHeartbeatDuration * 60000) {
if (zeroPoint + closestTime * 1000 > currentTimeMs + mMpHeartbeatDuration) {
keepAlive = true;
registerHeartbeatTimer(currentTimeMs + mMpHeartbeatDuration * 60000 + 5000, keepAlive);
registerHeartbeatTimer(currentTimeMs + mMpHeartbeatDuration + 5000, keepAlive);
} else {
registerHeartbeatTimer(zeroPoint + closestTime * 1000, keepAlive);
}

Loading…
Cancel
Save