Skip to content
Snippets Groups Projects
Commit 5a0fce4a authored by Christian Wulf's avatar Christian Wulf
Browse files

added hint

parent 0346b9d3
No related branches found
No related tags found
No related merge requests found
...@@ -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 (final IOException ex) { } catch (final IOException ex) {
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 (final IOException e) { } catch (final IOException e) {
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.
*
* @param buffer
* to be read from
*/
protected abstract void read(final ByteBuffer buffer); protected abstract void read(final ByteBuffer buffer);
} }
wiki @ 0e447457
Subproject commit cdfd44ee829e7bba079ee71983e5711a4e6cb259 Subproject commit 0e4474577e1f49bc96e734c286b2d9e0363895e8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment