Action action = null;
try {
action = suspended(req, res);
if (action.type() == Action.TYPE.SUSPEND) {
suspend(action, req, res);
} else if (action.type() == Action.TYPE.RESUME) {
CountDownLatch latch = (CountDownLatch) req.getAttribute(LATCH);
if (latch == null || req.getAttribute(AtmosphereResourceImpl.PRE_SUSPEND) == null) {
logger.debug("response wasn't suspended: {}", res);
return action;