From 5ddf07c3d54bc8eb0a764fd3c44b48ae17100c33 Mon Sep 17 00:00:00 2001 From: Lukas Alexander Kienzl Date: Sun, 20 May 2018 17:30:32 +0200 Subject: [PATCH] set default timeout to infinity --- src/ChromeHeadless.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChromeHeadless.php b/src/ChromeHeadless.php index a28d56e..366b1c4 100644 --- a/src/ChromeHeadless.php +++ b/src/ChromeHeadless.php @@ -10,11 +10,16 @@ class ChromeHeadless { protected $url; + protected $html; + protected $dom; + protected $user_agent; + protected $chrome_path = 'google-chrome'; - protected $timeout = 10; + + protected $timeout = null; public function __construct(string $url = '') { @@ -100,7 +105,11 @@ protected function makeRequest() $command = $this->createCommand(); $chrome = new Process($command); - $chrome->setTimeout($this->timeout); + + if (! is_null($this->timeout)) { + $chrome->setTimeout($this->timeout); + } + $chrome->run(); if (! $chrome->isSuccessful()) {