We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fff3e72 commit 3f66225Copy full SHA for 3f66225
src/Mutex.php
@@ -9,6 +9,7 @@
9
use NinjaMutex\Lock\MySqlLock;
10
use NinjaMutex\Lock\PredisRedisLock;
11
use NinjaMutex\Mutex as Ninja;
12
+use Predis\Client;
13
use Redis;
14
15
class Mutex
@@ -48,7 +49,12 @@ public function getStrategy()
48
49
50
public function getRedisClient()
51
{
- return Redis::connection()->client();
52
+ $connection = Redis::connection();
53
+ if ($connection instanceof Client) {
54
+ return $connection;
55
+ }
56
+
57
+ return $connection->client();
58
}
59
60
public function __call($method, $parameters)
0 commit comments