fhanik      2005/02/10 12:44:37

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/mcast
                        McastServiceImpl.java
  Log:
  make sure that we don't suck up CPU in case of multicast error
  
  Revision  Changes    Path
  1.14      +5 -3      
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- McastServiceImpl.java     11 Nov 2004 14:47:27 -0000      1.13
  +++ McastServiceImpl.java     10 Feb 2005 20:44:37 -0000      1.14
  @@ -243,7 +243,9 @@
                   try {
                       receive();
                   } catch ( Exception x ) {
  -                    log.warn("Error receiving mcast package.",x);
  +                    log.warn("Error receiving mcast package. Sleeping 
500ms",x);
  +                    try { Thread.sleep(500); } catch ( Exception ignore ){}
  +                    
                   }
               }
           }
  @@ -260,10 +262,10 @@
               while ( doRun ) {
                   try {
                       send();
  -                    Thread.sleep(time);
                   } catch ( Exception x ) {
                       log.warn("Unable to send mcast message.",x);
                   }
  +                try { Thread.sleep(time); } catch ( Exception ignore ) {}
               }
           }
       }//class SenderThread
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to