Skip to content

Commit

Permalink
Fixes #1503
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Mar 11, 2014
1 parent c577a2a commit 6b17c31
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ public void postPayload(final AtmosphereResponse response, byte[] data, int offs
}

void cancelF(AtmosphereRequest request) {
Future<?> f = (Future<?>) request.getAttribute(HEARTBEAT_FUTURE);
if (f != null) f.cancel(false);
request.removeAttribute(HEARTBEAT_FUTURE);
try {
Future<?> f = (Future<?>) request.getAttribute(HEARTBEAT_FUTURE);
if (f != null) f.cancel(false);
request.removeAttribute(HEARTBEAT_FUTURE);
} catch (Exception ex) {
logger.trace("", ex);
}
}

public HeartbeatInterceptor clock(final AtmosphereResource r, final AtmosphereRequest request, final AtmosphereResponse response) {
Expand Down

0 comments on commit 6b17c31

Please sign in to comment.