]> jxnshi.xyz Git - jxnshi.xyz.git/commitdiff
Fix state thingy
authorjxnshi <jxnshi@cock.li>
Fri, 13 Dec 2024 20:08:42 +0000 (21:08 +0100)
committerjxnshi <jxnshi@cock.li>
Fri, 13 Dec 2024 20:08:42 +0000 (21:08 +0100)
src/main.zig

index 361c678dddc0748e797b04da850f6f1929f38161..1cfba1e972a212169ac635e48d2c9c1add45def9 100644 (file)
@@ -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, .{});
     }