tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1387487 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
Date Wed, 19 Sep 2012 08:45:29 GMT
Author: kfujino
Date: Wed Sep 19 08:45:28 2012
New Revision: 1387487

URL: http://svn.apache.org/viewvc?rev=1387487&view=rev
Log:
The "running" flag is moved out of "if" block. 

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1387487&r1=1387486&r2=1387487&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
Wed Sep 19 08:45:28 2012
@@ -64,8 +64,8 @@ public class TcpPingInterceptor extends 
     @Override
     public synchronized void start(int svc) throws ChannelException {
         super.start(svc);
+        running = true;
         if ( thread == null && useThread) {
-            running = true;
             thread = new PingThread();
             thread.setDaemon(true);
             thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1));
@@ -86,8 +86,8 @@ public class TcpPingInterceptor extends 
     
     @Override
     public void stop(int svc) throws ChannelException {
+        running = false;
         if ( thread != null ) {
-            running = false;
             thread.interrupt();
             thread = null;
         }



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


Mime
View raw message