Skip to content

Commit

Permalink
fix: ignore curl exceptions when closing webdriver inside destructor (F…
Browse files Browse the repository at this point in the history
…ixes symfony#466, fixes symfony#544)
  • Loading branch information
mtorromeo committed Aug 21, 2022
1 parent 0e1b5ad commit 5e0a504
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\Exception\TimeoutException;
use Facebook\WebDriver\Exception\WebDriverCurlException;
use Facebook\WebDriver\JavaScriptExecutor;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriver;
Expand Down Expand Up @@ -105,7 +106,11 @@ public function __wakeup(): void

public function __destruct()
{
$this->quit();
try {
$this->quit();
} catch (WebDriverCurlException) {
// ignore
}
}

public function start(): void
Expand Down

0 comments on commit 5e0a504

Please sign in to comment.