From 2b394290d487516ee5973d8fd143c99884e3189b Mon Sep 17 00:00:00 2001
From: Michael Eischer <eischer@cs.fau.de>
Date: Wed, 31 Mar 2021 14:26:42 +0200
Subject: [PATCH] Fix client retry crash

---
 src/refit/client/REFITLibByz.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/refit/client/REFITLibByz.java b/src/refit/client/REFITLibByz.java
index fe75985..0d0cf16 100644
--- a/src/refit/client/REFITLibByz.java
+++ b/src/refit/client/REFITLibByz.java
@@ -474,7 +474,7 @@ public class REFITLibByz extends REFITClientLibrary {
 			messageAuthentication.appendMulticastMAC(request, executionReplicas);
 			// Send directly to the execution replicas
 			sendToReplicas(request, executionReplicas);
-		} else {
+		} else if (REFITConfig.SEPARATE_EXECUTION_REPLICAS) {
 			// using MACs is sufficient as every executor processes the command on its own
 			// add MAC to wrapper to unify code paths
 			request.serializeMessage();
@@ -488,6 +488,12 @@ public class REFITLibByz extends REFITClientLibrary {
 
 				sendToReplica(wrapper, i);
 			}
+		} else {
+			// just broadcast to everyone
+			request.serializeMessage();
+			messageAuthentication.appendSignature(request);
+			// Send directly to the execution replicas
+			sendToReplicas(request, executionReplicas);
 		}
 	}
 
-- 
GitLab