a73x

bbf4b140

fix: mux hosts list blames an allocation failure on this machine, not the peer

a73x   2026-08-28 19:53

Commit message
fix: mux hosts list blames an allocation failure on this machine, not the peer

src/cli/mux_main.zig
Old New
@@ -592,7 +592,10 @@ fn hostsList(arena: std.mem.Allocator, path: []const u8, out_fd: std.posix.fd_t)
592 continue; 592 continue;
593 }; 593 };
594 var out: [proto.sessions_text_max]u8 = undefined; 594 var out: [proto.sessions_text_max]u8 = undefined;
595 const list = client.listSessions(arena, spec.poll_target, &out, hosts_list_ms, null) catch { 595 const list = client.listSessions(arena, spec.poll_target, &out, hosts_list_ms, null) catch |err| {
596 // Out of memory is this machine's fault, and printing
597 // `[unreachable]` for it would blame a box that is up.
598 if (err == error.OutOfMemory) return err;
596 printRow(out_fd, line, "\t[unreachable]\n", .{}); 599 printRow(out_fd, line, "\t[unreachable]\n", .{});
597 continue; 600 continue;
598 }; 601 };