if (lastPing!=null && now-lastPing > TIMEOUT) {
LOGGER.info("Repeated ping attempts failed on "+c.getName()+". Disconnecting");
c.disconnect(OfflineCause.create(Messages._ConnectionActivityMonitor_OfflineCause()));
} else {
// send a ping. if we receive a reply, it will be reflected in the next getLastHeard() call.
channel.callAsync(PING_COMMAND);
if (lastPing==null)
channel.setProperty(ConnectionActivityMonitor.class,now);
}
} else {
// we are receiving data nicely