Atmosphere/atmosphere — Issue #146: Tomcat7CometSupport doesn't detect closed connections
Author: smaldini
Created: 2012-01-13 16:08:51+00:00
State: open

As written in the subject, it will never detect dropping connections,

Quoting JF, this should fix the bug, I'll update the grails plugin according to that :

diff --git a/modules/cpr/src/main/java/org/atmosphere/container/Tomcat7CometSupport.java b/modules/cpr/src/main/java/org/atmosphere/container/Tomcat7Cometindex 5c9baad..6360c59 100644
--- a/modules/cpr/src/main/java/org/atmosphere/container/Tomcat7CometSupport.java
+++ b/modules/cpr/src/main/java/org/atmosphere/container/Tomcat7CometSupport.java
@@ -128,7 +128,7 @@ public class Tomcat7CometSupport extends AsynchronousProcessor {
/**
* Ignore END (the application just read the complete InputStream
*/
- //action = cancelled(req, res);
+ action = cancelled(req, res);
} else {
logger.debug("Cancelling response: {}", res);
bz51881(event);
but there is a case when the END event get sent when the InputStream.read() == EOF (crazy implementation!)