Treats ClosedChannelException as a fatal error and stops the Connector.
This commit is contained in:
parent
868228b3f6
commit
d937a29022
@ -8,6 +8,7 @@ package org.ice4j.stack;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.nio.channels.*;
|
||||
import java.util.logging.*;
|
||||
|
||||
import org.ice4j.*;
|
||||
@ -243,6 +244,18 @@ class Connector
|
||||
//this.stop().
|
||||
}
|
||||
}
|
||||
catch (ClosedChannelException cce)
|
||||
{
|
||||
logger.log(Level.WARNING,
|
||||
"A net access point has gone useless:", cce);
|
||||
|
||||
stop();
|
||||
errorHandler.handleFatalError(
|
||||
this,
|
||||
"ClosedChannelException occurred while listening"
|
||||
+ " for messages!",
|
||||
cce);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.log(Level.WARNING,
|
||||
|
||||
@ -398,6 +398,7 @@ class NetAccessManager
|
||||
|
||||
/**
|
||||
* Stops <tt>NetAccessManager</tt> and all of its <tt>MessageProcessor</tt>.
|
||||
* TODO: close all connectors as well?
|
||||
*/
|
||||
public void stop()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user