Skip to content

Commit 7cfe7d1

Browse files
authored
Merge pull request #5 from cheprasov/v102
v102
2 parents cb33f3e + e420346 commit 7cfe7d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
function updateJsonInRedis(RedisClient $Redis, $key, array $array) {
2323
// Create new Lock instance
24-
$Lock = new RedisLock($Redis, 'Lock_'.$key, RedisLock::FLAG_CATCH_EXCEPTIONS);
24+
$Lock = new RedisLock($Redis, 'Lock_'.$key, RedisLock::FLAG_DO_NOT_THROW_EXCEPTIONS);
2525

2626
// Acquire lock for 2 sec.
2727
// If lock has acquired in another thread then we will wait 3 second,

src/RedisLock/RedisLock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function __construct(RedisClient $Redis, $key, $flags = 0) {
105105
$this->flags = (int) $flags;
106106

107107
$this->token = $this->createToken();
108-
$this->catchExceptions = $this->isFlagExist(self::FLAG_CATCH_EXCEPTIONS);
108+
$this->catchExceptions = $this->isFlagExist(self::FLAG_DO_NOT_THROW_EXCEPTIONS);
109109
}
110110

111111
/**

0 commit comments

Comments
 (0)