if ((date - lastRequestDate) > timeout) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "HeartBeatTask: close connection");
ConnectionContext ctx = (ConnectionContext) connections.remove(key);
heartBeatTasks.remove(key);
reactToClientRequest(key.intValue(), new CnxCloseRequest());
if (ctx != null) {
MomException exc = new MomException(MomExceptionReply.HBCloseConnection, "Connection " + getId()
+ ':' + key + " closed");
ctx.pushError(exc);