From: jxnshi Date: Fri, 13 Dec 2024 20:08:42 +0000 (+0100) Subject: Fix state thingy X-Git-Url: https://jxnshi.xyz/repos?a=commitdiff_plain;h=18512184f81d276a90927ff6b0452768d6e3356d;p=jxnshi.xyz.git Fix state thingy --- diff --git a/src/main.zig b/src/main.zig index 361c678..1cfba1e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -39,7 +39,7 @@ fn handleClient(parent_allocator: std.mem.Allocator, connection: std.net.Server. while (true) { if (server.state != .ready) { - continue; + return; } var timer = try std.time.Timer.start(); @@ -161,7 +161,7 @@ fn handleClient(parent_allocator: std.mem.Allocator, connection: std.net.Server. _ = std.mem.replace(u8, layout_buffer.items, "{s}", temp_buffer.items, send_buffer.items); } - std.log.info("Responded in {d:.2}ms", .{timer.read() / 1_000_000}); + std.log.info("Responded in {d:.2}ms.", .{timer.read() / 1_000_000}); try request.respond(send_buffer.items, .{}); }