Skip to content

Commit

Permalink
Fixing close() for InboundPipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah committed Apr 5, 2024
1 parent d7440a2 commit 2d43b1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ public InboundPipeline(
@Override
public void close() {
isClosed = true;
Releasables.closeWhileHandlingException(decoder, aggregator);
Releasables.closeWhileHandlingException(pending);
pending.clear();
if (currentHandler != null) {
currentHandler.close();
currentHandler = null;
}
Releasables.closeWhileHandlingException(decoder, aggregator);
Releasables.closeWhileHandlingException(pending);
pending.clear();
}

public void handleBytes(TcpChannel channel, ReleasableBytesReference reference) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public class NativeInboundBytesHandler implements InboundBytesHandler {
private static final ThreadLocal<ArrayList<Object>> fragmentList = ThreadLocal.withInitial(ArrayList::new);
private static final InboundMessage PING_MESSAGE = new InboundMessage(null, true);

private ArrayDeque<ReleasableBytesReference> pending;
private InboundDecoder decoder;
private InboundAggregator aggregator;
private StatsTracker statsTracker;
private final ArrayDeque<ReleasableBytesReference> pending;
private final InboundDecoder decoder;
private final InboundAggregator aggregator;
private final StatsTracker statsTracker;
private boolean isClosed = false;

public NativeInboundBytesHandler(
Expand Down

0 comments on commit 2d43b1b

Please sign in to comment.