Skip to content

Preserve customizer handlers at pipeline head after handshake#1754

Merged
kevinherron merged 1 commit into
mainfrom
issues/gh1740
May 20, 2026
Merged

Preserve customizer handlers at pipeline head after handshake#1754
kevinherron merged 1 commit into
mainfrom
issues/gh1740

Conversation

@kevinherron
Copy link
Copy Markdown
Contributor

UascClientAcknowledgeHandler.onAcknowledge previously called addFirst(messageHandler) on the channel pipeline, which displaced any handler installed at position 0 by the client's pipeline customizer (e.g. a PcapWriteHandler added via pipeline.addFirst). Because UascClientMessageHandler is a ByteToMessageCodec, it then consumed inbound ByteBufs before they could reach the displaced customizer handler — silently breaking pcap capture and similar use cases for the remainder of the session.

Insert the message handler before DelegatingUascResponseHandler instead of at absolute position 0. The relative ordering is what the codec actually needs, and customizer handlers at the head keep seeing raw wire bytes — matching the symmetric behavior on the server side.

Fixes #1740

UascClientAcknowledgeHandler.onAcknowledge previously called
addFirst(messageHandler) on the channel pipeline, which displaced any
handler installed at position 0 by the client's pipeline customizer
(e.g. a PcapWriteHandler added via pipeline.addFirst). Because
UascClientMessageHandler is a ByteToMessageCodec, it then consumed
inbound ByteBufs before they could reach the displaced customizer
handler — silently breaking pcap capture and similar use cases for the
remainder of the session.

Insert the message handler before DelegatingUascResponseHandler instead
of at absolute position 0. The relative ordering is what the codec
actually needs, and customizer handlers at the head keep seeing raw
wire bytes — matching the symmetric behavior on the server side.

Fixes #1740

This comment was marked as low quality.

@kevinherron kevinherron merged commit 1853f4a into main May 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client pipeline customizer handlers are displaced after Hello/Acknowledge handshake

2 participants