Skip to content

Commit

Permalink
Add options to set protocol timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
zarulizham authored and freekmurze committed Aug 5, 2024
1 parent 6fffceb commit 11e36b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/browser.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const callChrome = async pup => {
...(request.options.env || {}),
...process.env
},
protocolTimeout: request.options.protocolTimeout ?? 30000,
});
}

Expand Down
5 changes: 5 additions & 0 deletions src/Browsershot.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,11 @@ public function timeout(int $timeout): static
return $this->setOption('timeout', $timeout * 1000);
}

public function protocolTimeout(int $protocolTimeout): static
{
return $this->setOption('protocolTimeout', $protocolTimeout * 1000);
}

public function userAgent(string $userAgent): static
{
return $this->setOption('userAgent', $userAgent);
Expand Down

0 comments on commit 11e36b8

Please sign in to comment.