@@ -38,13 +38,13 @@ public abstract class AbstractTcpReader<T> extends AbstractProducerStage<T> {
...
@@ -38,13 +38,13 @@ public abstract class AbstractTcpReader<T> extends AbstractProducerStage<T> {
socketChannel.close();
socketChannel.close();
}
}
}catch(finalIOExceptionex){
}catch(finalIOExceptionex){
logger.error("Error while reading",ex);
logger.error("Error while reading.",ex);
}finally{
}finally{
if(null!=serversocket){
if(null!=serversocket){
try{
try{
serversocket.close();
serversocket.close();
}catch(finalIOExceptione){
}catch(finalIOExceptione){
logger.debug("Failed to close TCP connection!",e);
logger.debug("Failed to close TCP connection.",e);
}
}
}
}
...
@@ -66,6 +66,12 @@ public abstract class AbstractTcpReader<T> extends AbstractProducerStage<T> {
...
@@ -66,6 +66,12 @@ public abstract class AbstractTcpReader<T> extends AbstractProducerStage<T> {
}
}
}
}
/**
* Important note: Do not catch {@link BufferUnderflowException}s since they are caught by the caller to automatically fill the buffer with new content.