Set 'last ping' time for host based on ping.timeout and ping.interval global config values

(currentTime - (ping.timeout * ping.interval)) instead of using hardcoded value of (currentTime - 10mins)
This commit is contained in:
Koushik Das 2014-09-01 17:44:55 +05:30
parent b38d0b6b43
commit 10391c9b49

View File

@ -633,7 +633,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
host = createForUpdate();
host.setManagementServerId(null);
host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
host.setLastPinged(lastPing);
host.setDisconnectedOn(new Date());
ub = getUpdateBuilder(host);
update(ub, sc, null);