Skip to content

Commit dac415c

Browse files
author
Antoni Nowakowski
committed
Fix messages dropping twice in partition
1 parent d72990c commit dac415c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

simulator/src/main/java/byzzbench/simulator/faults/behaviors/ByzzFuzzDropMessageBehavior.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ public void accept(FaultContext context) {
100100
if (router.haveConnectivity(sender, recipient)) {
101101
return;
102102
}
103-
104-
// otherwise, drop the message: the sender and recipient are in different partitions
105-
context.getScenario().getTransport().dropEvent(e.getEventId());
103+
if(e.getStatus() == Event.Status.QUEUED) {
104+
// otherwise, drop the message: the sender and recipient are in different partitions
105+
context.getScenario().getTransport().dropEvent(e.getEventId());
106+
}
106107
}
107108
}

0 commit comments

Comments
 (0)