fhanik 2004/04/15 07:12:37 Modified: modules/cluster/src/share/org/apache/catalina/cluster/tcp TcpReplicationThread.java Log: Added all the interestOps to the synchronized blocks to guarantee non blocking behaviour at all times. Thanks to Rainer Jung for this patch. Revision Changes Path 1.11 +3 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java Index: TcpReplicationThread.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TcpReplicationThread.java 7 Apr 2004 19:02:31 -0000 1.10 +++ TcpReplicationThread.java 15 Apr 2004 14:12:37 -0000 1.11 @@ -138,14 +138,14 @@ channel.close(); return; } - // resume interest in OP_READ, OP_WRITE - int resumeOps = key.interestOps() | SelectionKey.OP_READ; - long _debugstart = System.currentTimeMillis(); + //acquire the interestOps mutex Object mutex = this.getPool().getInterestOpsMutex(); synchronized (mutex) { // cycle the selector so this key is active again key.selector().wakeup(); + // resume interest in OP_READ, OP_WRITE + int resumeOps = key.interestOps() | SelectionKey.OP_READ; key.interestOps(resumeOps); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]