Catch another case where shutdown state can cause a

key to be invalid before it is checked.  The "bug"
was that shutdown of a network server would occasionally
log an exception about a canceled key.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10947 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
PSp..om 2013-12-30 02:27:15 +00:00
parent a499e972ab
commit 90913bf8c3

View File

@ -460,6 +460,10 @@ public class SelectorKernel extends AbstractKernel
if( !go.get() )
return; // it's because we're shutting down
throw new KernelException( "Premature selector closing", e );
} catch( CancelledKeyException e ) {
if( !go.get() )
return; // it's because we're shutting down
throw new KernelException( "Invalid key state", e );
} catch( IOException e ) {
if( !go.get() )
return; // error likely due to shutting down