Commit f73dbd18 authored by Ludovic Ganée's avatar Ludovic Ganée

correction tests

parent 7743eaf9
Pipeline #9374 failed with stage
in 15 seconds
......@@ -16,6 +16,7 @@ use Pheanstalk\Job;
use Pheanstalk\Pheanstalk;
use Pheanstalk\PheanstalkInterface;
use Pheanstalk\Response;
use Throwable;
/**
* Client Beanstalkd
......@@ -109,9 +110,12 @@ class Beanstalk
*/
public function isConnected()
{
$Pheanstalk = $this->getPheanstalk();
if ($Pheanstalk && $conn = $Pheanstalk->getConnection()) {
return $conn->isServiceListening();
try {
$Pheanstalk = $this->getPheanstalk();
if ($Pheanstalk && $conn = $Pheanstalk->getConnection()) {
return $conn->isServiceListening();
}
} catch (Throwable $e) {
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment