Rework page wait again

Further reducing bouncing between page and server for loop polling. If there is
a page, the page polls. If there isn't a page, the server polls. Simpler.
This commit is contained in:
Karl Seguin
2025-09-03 19:37:09 +08:00
parent e237e709b6
commit b6137b03cd
12 changed files with 185 additions and 179 deletions

View File

@@ -137,7 +137,7 @@ fn run(alloc: Allocator) !void {
const server = &_server.?;
defer server.deinit();
server.run(address, opts.timeout) catch |err| {
server.run(address, opts.timeout * 1000) catch |err| {
log.fatal(.app, "server run error", .{ .err = err });
return err;
};
@@ -166,7 +166,7 @@ fn run(alloc: Allocator) !void {
},
};
session.wait(5); // 5 seconds
_ = session.wait(5000); // 5 seconds
// dump
if (opts.dump) {