Skip to content

Commit

Permalink
Avoid using forever timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: Hollow Man <[email protected]>
  • Loading branch information
HollowMan6 committed Jan 25, 2022
1 parent cc93b7e commit d1bc1c6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ readme = "README.md"
# # Wait for automatic chrome download to be available: https://github.com/atroche/rust-headless-chrome/issues/286
# headless_chrome = { git = "https://github.com/atroche/rust-headless-chrome", branch = "master", features= ["fetch"] }

# A forked version with my patches.
# A forked version to expand some response timeout to 300 seconds.
headless_chrome = { git = "https://github.com/HollowMan6/rust-headless-chrome" }
mdbook = "0.4.15"
serde = "1.0.134"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Support customize PDF paper orientation, scale of the webpage rendering, paper w
Check [book.toml](test_doc/book.toml#L10-L33) for details for the available configurations of `[output.pdf]`.

## Crates.io
This package currently won't be published to [crates.io](https://crates.io) as one of the dependencies applies patches from the [headless chrome GitHub fork](https://github.com/HollowMan6/rust-headless-chrome).
This package currently won't be published to [crates.io](https://crates.io) as one of the dependencies applies patches from the [headless chrome GitHub fork](https://github.com/HollowMan6/rust-headless-chrome), and the patches [won't be merged to upstream](https://github.com/atroche/rust-headless-chrome/issues/287).
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ enable = true
查看 [book.toml](test_doc/book.toml#L10-L33) 以了解 `[output.pdf]` 可用配置的详细信息。

## Crates.io
由于本软件的依赖使用了来自 [headless chrome GitHub fork](https://github.com/HollowMan6/rust-headless-chrome) 的补丁,因而目前不会在 [crates.io](https://crates.io) 中发布。
由于本软件的依赖使用了来自 [headless chrome GitHub fork](https://github.com/HollowMan6/rust-headless-chrome) 的补丁,并且[该补丁并不会被合并](https://github.com/atroche/rust-headless-chrome/issues/287)因而目前不会在 [crates.io](https://crates.io) 中发布。
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.headless(true)
.sandbox(false)
.ignore_certificate_errors(true)
.idle_browser_timeout(Duration::from_secs(u64::max_value()))
.idle_browser_timeout(Duration::from_secs(600))
.path(browser_binary)
.args(vec![
OsStr::new("--unlimited-storage"),
Expand Down
2 changes: 1 addition & 1 deletion test_doc/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ title = "An Example"
# trying-times = 1
## This backend only support latest Chromium based browsers, not Safari and Firefox currently.
## If needed, please specify the full path.
## If you specify the wrong binary, chances are that this program will never end.
## If you specify the wrong binary, chances are that there will be a timeout error.
# browser-binary-path = ""
## Check Chrome Devtools Protocol Docs for the explanation of the following params:
## https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF
Expand Down

0 comments on commit d1bc1c6

Please sign in to comment.