Netty close the channel internally without any exception
王福强
fujohnwang at gmail.com
Thu Nov 4 10:18:20 EDT 2010
the exceptionCaught() doesn't print out any exception information,
and it seems that the channel is closed 'normally'.
we have 16*2 channels running in a same vm, each channel will blocked until
close is requested externally, the after each channel connected, I write
such code to wait until the channel is closed externally:
....
while (running) {
try {
if (future.getChannel().getCloseFuture()
.await(Integer.MAX_VALUE, TimeUnit.SECONDS)) {
logger.info("working channel:'{}' has been closed
internally.",
future.getChannel());
logger.info(
"working channel internal close reason:{}",
ExceptionUtils.getFullStackTrace(future.getChannel()
.getCloseFuture().getCause()));
break;
}
} catch (InterruptedException e) {
logger.info("ErosaWorkingChannelRunnable is interrupted,
"
+ "we will break the loop and end it.");
Thread.currentThread().interrupt();
break;
}
}
} finally {
if (channel != null) {
channel.close().awaitUninterruptibly().addListener(ChannelFutureListener.CLOSE);
}
}
It seems that the channel just close internally without any information, is
there any way I can debug on this?
(maybe too many threads reside in one VM? when we split different channels
to different vm instances, the problem seems fixed, I really can't figure
out why)
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-close-the-channel-internally-without-any-exception-tp5705470p5705470.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list