Skip to content

Commit

Permalink
Merge pull request #2012 from sm2017/patch-1
Browse files Browse the repository at this point in the history
Add `failed to open stream` to ConnectException
  • Loading branch information
sagikazarmark committed Mar 26, 2018
2 parents 6e8c90f + 009cfa9 commit 21f5dde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Handler/StreamHandler.php
Expand Up @@ -60,6 +60,7 @@ public function __invoke(RequestInterface $request, array $options)
if (strpos($message, 'getaddrinfo') // DNS lookup failed
|| strpos($message, 'Connection refused')
|| strpos($message, "couldn't connect to host") // error on HHVM
|| strpos($message, "connection attempt failed")
) {
$e = new ConnectException($e->getMessage(), $request, $e);
}
Expand Down

0 comments on commit 21f5dde

Please sign in to comment.