Skip to content

Commit

Permalink
Provide correct message type in Sniffer
Browse files Browse the repository at this point in the history
Previously we pushed the correct message but wrong message type after an
intercept. This is now fixed with using the message type from the
intercepet message directly.
  • Loading branch information
jbesraa committed Jan 27, 2025
1 parent 4c7992d commit f024e1d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions roles/tests-integration/lib/sniffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ impl Sniffer {
)
.expect("Failed to create the frame"),
);
downstream_messages
.add_message(msg_type, intercept_message.replacement_message.clone());
downstream_messages.add_message(
intercept_message.replacement_message.message_type(),
intercept_message.replacement_message.clone(),
);
let _ = send.send(frame).await;
}
}
Expand Down Expand Up @@ -271,8 +273,10 @@ impl Sniffer {
)
.expect("Failed to create the frame"),
);
upstream_messages
.add_message(msg_type, intercept_message.replacement_message.clone());
upstream_messages.add_message(
intercept_message.replacement_message.message_type(),
intercept_message.replacement_message.clone(),
);
let _ = send.send(frame).await;
}
}
Expand Down

0 comments on commit f024e1d

Please sign in to comment.