update watcher based on socket changes
Some checks failed
Build / build (push) Successful in 3m23s
Build / sign (push) Failing after 15s
Build / deploy (push) Failing after 1m33s

This commit is contained in:
Emil Lerch 2023-10-28 08:17:17 -07:00
parent 7e2a3b04fa
commit 685d8b574b
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -25,7 +25,7 @@ const requestDeinitFn = *const fn () void;
const timeout = 250;
var watcher = Watch.init(executorChanged);
var watcher: Watch = undefined;
var watcher_thread: ?std.Thread = null;
// Timer used by processRequest to provide ttfb/ttlb data in output
@ -405,6 +405,7 @@ fn childMain(allocator: std.mem.Allocator) !void {
defer allocator.free(executors);
defer parsed_config.deinit();
watcher = Watch.init(executorChanged);
watcher_thread = try std.Thread.spawn(.{}, Watch.startWatch, .{&watcher});
var server = std.http.Server.init(allocator, .{ .reuse_address = true });