Make sure that it continue to try to read from the socket even if the SocketTimeoutException was triggered because of the SO_TIMEOUT. See #520

This commit is contained in:
Norman Maurer 2012-08-15 22:39:40 +02:00
parent d3d5a931d0
commit b6264c02d9

View File

@ -74,9 +74,15 @@ abstract class AbstractOioWorker<C extends AbstractOioChannel> implements Worker
try {
cont = process();
} catch (Throwable t) {
if (!channel.isSocketClosed() && !(t instanceof SocketTimeoutException)) {
boolean readTimeout = t instanceof SocketTimeoutException;
if (!readTimeout && !channel.isSocketClosed()) {
fireExceptionCaught(channel, t);
}
if (readTimeout) {
// the readTimeout was triggered because of the SO_TIMEOUT,
// so just continue with the loop here
cont = true;
}
} finally {
processEventQueue();