if (session != null) {
session.removeAttribute(cometRequestsAttribute);
}
// Close the comet connection
try {
HttpEventImpl cometEvent = request.getEvent();
cometEvent.setType(HttpEvent.EventType.END);
getNext().event(request, request.getResponse(), cometEvent);
cometEvent.close();
} catch (Exception e) {
container.getLogger().warn(
sm.getString("cometConnectionManagerValve.event"),
e);
}