╭ changed ────────╮ │src/serve_ssh.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │77 fn h(ctx: Context, stream: std.Io.net.Stream) void { │ │78 defer stream.close(ctx.io); │ │79 │ │80 - const prev_count = active_connections.fetchAdd(1, .monotonic); │ │81 - defer _ = active_connections.fetchSub(1, .monotonic); │ │80 + const prev_count = active_connections.fetchAdd(1, .acq_rel); │ │81 + defer _ = active_connections.fetchSub(1, .acq_rel); │ │82 if (prev_count >= max_connections) { │ │83 serve_common.logError(ctx.io, ctx.err, "ssh: connection limit reached, dropping\n", .{});│ │84 return; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │153 if (self.idle_state.exempt.load(.acquire)) return false; │ │154 │ │155 // our own work between packets is not the peer idling │ │156 - const seen = self.idle_state.activity.load(.monotonic); │ │156 + const seen = self.idle_state.activity.load(.acquire); │ │157 defer self.last_seen = seen; │ │158 if (self.idle_state.waiting.load(.acquire) and seen == self.last_seen) {│ │159 self.idle_ticks += 1; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯