Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.milo.opcua.stack.core.types.UaRequestMessageType;
import org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode;
import org.eclipse.milo.opcua.stack.transport.client.ClientApplicationContext;
import org.eclipse.milo.opcua.stack.transport.client.uasc.InboundUascResponseHandler.DelegatingUascResponseHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -254,7 +255,16 @@ private void onAcknowledge(ChannelHandlerContext ctx, ByteBuf buffer) {
awaitingHandshake,
channelParameters);

ctx.pipeline().addFirst(messageHandler);
// Insert immediately before DelegatingUascResponseHandler rather than at
// position 0, so any pipeline-customizer handlers at the head (e.g. a
// PcapWriteHandler installed via addFirst) keep seeing raw wire bytes.
ChannelHandlerContext responseCtx =
ctx.pipeline().context(DelegatingUascResponseHandler.class);
if (responseCtx != null) {
ctx.pipeline().addBefore(responseCtx.name(), null, messageHandler);
} else {
ctx.pipeline().addFirst(messageHandler);
}
});
}

Expand Down
Loading