Skip to content

Lightpanda: the headless browser designed for AI and automation

default watchdog-ms to 30000

Karl Seguina3ee14c69cf3
diff --git a/src/Config.zig b/src/Config.zig
index 7b49c751a..cc825192b 100644
--- a/src/Config.zig
+++ b/src/Config.zig
@@ -343,7 +343,10 @@ pub fn disableWorkers(self: *const Config) bool {
pub fn watchdogMs(self: *const Config) ?u32 {
return switch (self.mode) {
- inline .serve, .fetch, .mcp, .agent => |opts| opts.watchdog_ms,
+ inline .serve, .fetch, .mcp, .agent => |opts| {
+ const ms = opts.watchdog_ms orelse 30000;
+ return if (ms == 0) null else ms;
+ },
else => unreachable,
};
}
diff --git a/src/help.zon b/src/help.zon
index 625a9cf86..1163f001c 100644
--- a/src/help.zon
+++ b/src/help.zon
@@ -360,7 +360,7 @@
\\ stuck in an endless script loop). In serve mode the CDP
\\ connection is then closed. Unlike fetch's --terminate-ms, an idle
\\ or normally-working page never trips this.
- \\ Defaults to disabled.
+ \\ Defaults to [a very generous] 30000, disable by setting to 0.
\\ --web-bot-auth-domain <DOMAIN>
\\ Your domain, e.g. yourdomain.com.
\\ --web-bot-auth-key-file <PATH>