Atmosphere/atmosphere — Issue #139: when a request timedout request is closed before the listeners are called
Author: survivant
Created: 2012-01-06 14:06:09+00:00
State: open

in AsyncronousProcessor

public Action timedout(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {

try {
response.getOutputStream().close();
} catch (Throwable t) {
try {
response.getWriter().close();
} catch (Throwable t2) {
}
}

The response is close before : r.notifyListeners();

because of that, it's impossible than the Listeners send data on the response before it's closed.

I suggest to move

r.notifyListeners();

before the close.