summaryrefslogtreecommitdiff
path: root/test/replicas.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/replicas.zig')
-rw-r--r--test/replicas.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/replicas.zig b/test/replicas.zig
index c0df99a1..e035cd81 100644
--- a/test/replicas.zig
+++ b/test/replicas.zig
@@ -1462,7 +1462,8 @@ const Soak = struct {
/// from them (`joined`: in process, both read one).
fn stamp(s: *Soak, cl: *Client, peer: *replica.Peer) void {
const out = peer.out.items;
- var at = cl.marked;
+ // A cut (Peer.send, past its limit) empties the queue for its words.
+ var at = @min(cl.marked, out.len);
while (pardes.wire.framed(out[at..]) catch null) |f| : (at += f.total) {
if (f.tag != @backingInt(pardes.wire.ServerTag.unit)) continue;
const head = at + f.total - f.payload.len;