Skip to content

Commit

Permalink
- RELAY2 now also clears the headers and re-creates them from the buf…
Browse files Browse the repository at this point in the history
…fer (same behavior as RELAY3). This should not pose any incompatibilities
  • Loading branch information
belaban committed Sep 26, 2023
1 parent 099c7d5 commit 2e5dc9b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/org/jgroups/protocols/relay/RELAY2.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ protected void handleRelayMessage(Message msg) {
log.warn("%s: received a message without a relay header; discarding it", local_addr);
return;
}
try {
msg.clearHeaders(); // remove all headers added by the bridge cluster
msg.putHeader(id, hdr);
((BaseMessage)msg).readHeaders(hdr.headers());
}
catch(Exception ex) {
log.error("%s: failed handling message relayed from %s: %s", local_addr, msg.src(), ex);
}

if(hdr.final_dest != null) {
Message message=msg;
RelayHeader header=hdr;
Expand Down

0 comments on commit 2e5dc9b

Please sign in to comment.