hmm, it should probably throw the commented out channel exception instead of simply bailing out with the flag set. After all the timeout has not been reached, so the caller should not be tricked into thinking that it has, since no one ever checks the interrupted flag

Filip


On 01/26/2011 09:53 AM, ma...@apache.org wrote:
Author: markt
Date: Wed Jan 26 16:53:23 2011
New Revision: 1063791

URL: http://svn.apache.org/viewvc?rev=1063791&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50648
Correctly set the interrupt status if a thread using RpcChannel is interrupted 
waiting for a message reply.
Based on a patch by Olivier Costet.

Modified:
     tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
     tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1063791&r1=1063790&r2=1063791&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Wed Jan 
26 16:53:23 2011
@@ -95,8 +95,7 @@ public class RpcChannel implements Chann
                  if ( rpcOptions != NO_REPLY ) collector.wait(timeout);
              }
          } catch ( InterruptedException ix ) {
-            Thread.interrupted();
-            //throw new ChannelException(ix);
+            Thread.currentThread().interrupt();
          }finally {
              responseMap.remove(key);
          }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1063791&r1=1063790&r2=1063791&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jan 26 16:53:23 2011
@@ -158,6 +158,11 @@
          Be consistent with locks on sessionCreationTiming,
          sessionExpirationTiming in DeltaManager.resetStatistics(). (kkolinko)
        </fix>
+<fix>
+<bug>50648</bug>: Correctly set the interrupt status if a thread using
+<code>RpcChannel</code>  is interrupted waiting for a message reply.
+        Based on a patch by Olivier Costet. (markt)
+</fix>
      </changelog>
    </subsection>
    <subsection name="Web applications">



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




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

Reply via email to