tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r532877 - in /tomcat/tc6.0.x/trunk/java/org/apache/catalina/tribes/transport: PooledSender.java bio/PooledMultiSender.java nio/PooledParallelSender.java
Date Fri, 27 Apr 2007 15:18:37 GMT
here is a patch that would solve it the way I proposed

Index: java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
===================================================================
--- 
java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java        
(revision 533123)
+++ 
java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java        
(working copy)
@@ -286,6 +286,15 @@
             if ( sender.keepalive() ) {
                 nioSenders.remove(entry.getKey());
                 result = true;
+            } else {
+                try {
+                    sender.read(null);
+                }catch ( IOException x ) {
+                    sender.disconnect();
+                    sender.reset();
+                    nioSenders.remove(entry.getKey());
+                    result = true;
+                }
             }
         }
         return result;

Only because membership and connections have nothing to do with each 
other :)
Also, no other way to detect a disconnect than to issue a read on the 
channel.
Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message