if (!isClosing()) {
// TODO: consider using context's allocator for heap buffer here
ctx.fireChannelRead(Unpooled.copiedBuffer(data, off, (int) len));
+ adjustWindow(len);
}
}
// If we're already closing, ignore incoming data
if (!isClosing()) {
LOG.debug("Discarding {} bytes of extended data", len);
+ adjustWindow(len);
}
}
+ private void adjustWindow(final long len) throws IOException {
+ getLocalWindow().consumeAndCheck(len);
+ }
+
@Override
public void close() {
this.close(false);