diff --git a/src/decentralizepy/communication/TCPRandomWalkRouting.py b/src/decentralizepy/communication/TCPRandomWalkRouting.py index 14334201af64c0851256e9aa3909104d260284f1..8380840a1dd2e816c12211c334316e75ef64fa8a 100644 --- a/src/decentralizepy/communication/TCPRandomWalkRouting.py +++ b/src/decentralizepy/communication/TCPRandomWalkRouting.py @@ -721,6 +721,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase): logging.info("Sent data of size: {}".format(data_size)) logging.debug("send: rw? {}".format(data.get("rw", False))) + data_copy = data.copy() to_send = self.encrypt(data) if uid == "rw" and data.get("rw", False): # a rw message, they are shots into the blind, we need not track them, @@ -740,7 +741,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase): return elif type(uid) == tuple and uid[0] == "all": assert uid[1] == self.current_round - self.current_data = data + self.current_data = data_copy logging.debug(f"Sending to all neighbors {self.current_neighbors}") for n in self.current_neighbors: send(n, to_send)