Fixed issue: NETTY-25 (Unnecessarily logged exception in the blocking I/O server socket)

* Suppressed the expected exception logging
This commit is contained in:
Trustin Lee 2008-08-22 11:39:02 +00:00
parent abdefea703
commit b4c6d82be7

View File

@ -216,6 +216,12 @@ class OioServerSocketPipelineSink extends AbstractChannelSink {
} catch (SocketTimeoutException e) { } catch (SocketTimeoutException e) {
// Thrown every second to stop when requested. // Thrown every second to stop when requested.
} catch (IOException e) { } catch (IOException e) {
// Don't log the exception if the server socket was closed
// by a user.
if (!channel.isBound()) {
break;
}
logger.warn( logger.warn(
"Failed to accept a connection.", e); "Failed to accept a connection.", e);
try { try {