Skip to content

Commit 6af6c39

Browse files
committed
fix byzzfuzz error when mutating after dropping
1 parent 940f849 commit 6af6c39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public void accept(FaultContext context) {
6666

6767
// apply the random mutator
6868
MessageMutationFault mutator = mutators.get(rand.nextInt(mutators.size()));
69-
context.getScenario().getTransport().applyMutation(e.getEventId(), mutator);
69+
70+
// apply the mutation (if the message is still queued)
71+
if (e.getStatus() == Event.Status.QUEUED) {
72+
context.getScenario().getTransport().applyMutation(e.getEventId(), mutator);
73+
}
7074
}
7175
}

0 commit comments

Comments
 (0)