You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by sc...@apache.org on 2009/02/04 17:51:41 UTC
svn commit: r740787 -
/incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java
Author: sccomer
Date: Wed Feb 4 16:51:40 2009
New Revision: 740787
URL: http://svn.apache.org/viewvc?rev=740787&view=rev
Log:
fix for ETCH-55: merge changes from 1.0.2 branch to trunk - 739287 fix for selector under linux
under linux the java selector's select method occasionally throws an IOException with message File exists. it means nothing and can be ignored. this is a work around for a java bug.
Modified:
incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java
Modified: incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java?rev=740787&r1=740786&r2=740787&view=diff
==============================================================================
--- incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java (original)
+++ incubator/etch/trunk/util/src/main/java/org/apache/etch/util/core/nio/Selector.java Wed Feb 4 16:51:40 2009
@@ -83,7 +83,23 @@
{
runActions();
- int n = selector.select();
+ int n;
+ while ( true )
+ {
+ try
+ {
+ n = selector.select();
+ break;
+ }
+ catch( IOException e )
+ {
+ // Workaround, see sun bug 6693490
+ //System.out.println("****** caught IOException");
+ if ( e.getMessage() != null && e.getMessage().indexOf("File exists") != -1 )
+ continue;
+ throw e;
+ }
+ }
// Log.report( "selected", "selector", this, "n", n );
if (n > 0)
{