Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

fix: set default fetch timeout to 25 seconds

ldm061fe8e0f8fd0
diff --git a/moli/src/cli.rs b/moli/src/cli.rs
index e35e9eaa4..0ed5b0e82 100644
--- a/moli/src/cli.rs
+++ b/moli/src/cli.rs
@@ -124,7 +124,7 @@ pub struct FetchArgs {
/// Maximum wait time in milliseconds. Network-idle and DOM-stable fetches
/// return the current page with a warning when this deadline expires.
- #[arg(long, alias = "wait-ms", default_value_t = 10_000)]
+ #[arg(long, alias = "wait-ms", default_value_t = 25_000)]
pub timeout: u64,
#[command(flatten)]
diff --git a/moli/tests/cli.rs b/moli/tests/cli.rs
index bde0fa79f..101cf4a6b 100644
--- a/moli/tests/cli.rs
+++ b/moli/tests/cli.rs
@@ -100,7 +100,7 @@ fn parses_explicit_fetch_command_with_compatibility_flags() {
wait_response_url: None,
wait_response_body: None,
wait_response_json: None,
- timeout: 10_000,
+ timeout: 25_000,
common: CommonArgs {
insecure_disable_tls_host_verification: false,
obey_robots: true,
@@ -391,7 +391,7 @@ fn infers_fetch_mode_from_bare_url() {
wait_response_url: None,
wait_response_body: None,
wait_response_json: None,
- timeout: 10_000,
+ timeout: 25_000,
common: CommonArgs::default(),
url: "https://example.com".to_owned(),
}))
@@ -426,7 +426,7 @@ fn infers_fetch_mode_from_fetch_only_flags_and_defaults_dump_to_html() {
wait_response_url: None,
wait_response_body: None,
wait_response_json: None,
- timeout: 10_000,
+ timeout: 25_000,
common: CommonArgs::default(),
url: "https://example.com".to_owned(),
}))
@@ -465,7 +465,7 @@ fn infers_fetch_mode_from_header_flag() {
wait_response_url: None,
wait_response_body: None,
wait_response_json: None,
- timeout: 10_000,
+ timeout: 25_000,
common: CommonArgs::default(),
url: "https://example.com".to_owned(),
}))