diff options
| -rw-r--r-- | test/replicas.zig | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/replicas.zig b/test/replicas.zig index 4adc3240..2a486db8 100644 --- a/test/replicas.zig +++ b/test/replicas.zig @@ -942,8 +942,13 @@ const Witness = struct { } /// A replica of dump `d`, as the soak's clients make theirs. + /// The kinds the witness's replica distrusts: it keeps a pointer to + /// them for its life (a local here was a stack slot gone by its first + /// kind's call: an index of 0xAA..., the screen-state soak's panic). + var distrusted: pardes.Addon.Distrusted = .{}; + fn load(d: *const Dump) !*replica.Replica { - var distrusted: pardes.Addon.Distrusted = .{}; + distrusted = .{}; // No client's id: every unit is another's. const rp = try replica.Replica.initDump(gpa, std.math.maxInt(u16), d.view, d.bytes, .{ .cols = d.cols, .rows = d.rows, .distrusted = &distrusted }); rp.guess = false; @@ -1772,6 +1777,11 @@ const Soak = struct { cl.r = null; } cl.tries += 1; + // The far client refused before its screen after the + // flood (a join again for its lag finds its view taken: + // a join with no room lets an away one go): said, so + // that "it left" says why. + if (net.throttled == @as(?usize, c) and !s.far_final and cl.tries == 1) std.debug.print("seed {d} rtt {d} ms: the far client refused (every view taken), {d} keys left, try {d}\n", .{ s.r.seed, s.r.rtt_ms, cl.left, cl.tries }); if (cl.left > 0 and cl.tries < 40) try net.send(.{ .at = net.cross(&net.up[c], c, m.at + 500_000, &.{}, 3), .n = 0, .kind = .dial, .who = m.who, .bytes = &.{} }) else { // Given up on: its keys are never typed. cl.dialling = false; |
