You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2004/02/23 07:58:28 UTC
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast McastServiceImpl.java
fhanik 2004/02/22 22:58:28
Modified: modules/cluster/src/share/org/apache/catalina/cluster/mcast
McastServiceImpl.java
Log:
reenabled the doRun flag
Revision Changes Path
1.8 +7 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
Index: McastServiceImpl.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- McastServiceImpl.java 23 Feb 2004 06:36:13 -0000 1.7
+++ McastServiceImpl.java 23 Feb 2004 06:58:28 -0000 1.8
@@ -186,9 +186,10 @@
* @throws IllegalStateException if the service is already started
*/
public synchronized void start(int level) throws IOException {
- if ( doRun ) throw new IllegalStateException("Service already running.");
+ if ( sender != null && receiver != null ) throw new IllegalStateException("Service already running.");
if ( level == 1 ) {
socket.joinGroup(address);
+ doRun = true;
receiver = new ReceiverThread();
receiver.setDaemon(true);
receiver.start();
@@ -198,7 +199,7 @@
sender = new SenderThread(sendFrequency);
sender.setDaemon(true);
sender.start();
- doRun = true;
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org