diff options
author | michael-grunder <michael.grunder@gmail.com> | 2017-11-11 22:21:44 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2017-11-11 22:21:44 +0300 |
commit | 5a3f76247d72aa4d7c671dbd7f657b4085ee6a17 (patch) | |
tree | adbbaae05a84e29427b48d62bbb721d887685775 /redis_session.c | |
parent | b63d79958e0f6b5abc6eaa6f720b4bfb17eb2e8f (diff) |
Actually change whether we're locked if we can't read the lock key
Diffstat (limited to 'redis_session.c')
-rw-r--r-- | redis_session.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/redis_session.c b/redis_session.c index bbcd1d98..1ad5b49a 100644 --- a/redis_session.c +++ b/redis_session.c @@ -345,6 +345,7 @@ static void refresh_lock_status(RedisSock *redis_sock, redis_session_lock_status if (lock_status->is_locked && INI_INT("redis.session.lock_expire") == 0) return; + /* Command to get our lock key value and compare secrets */ cmdlen = REDIS_SPPRINTF(&cmd, "GET", "s", lock_status->lock_key, strlen(lock_status->lock_key)); @@ -353,6 +354,8 @@ static void refresh_lock_status(RedisSock *redis_sock, redis_session_lock_status if (reply != NULL) { lock_status->is_locked = IS_LOCK_SECRET(reply, replylen, lock_status->lock_secret); efree(reply); + } else { + lock_status->is_locked = 0; } /* Issue a warning if we're not locked. We don't attempt to refresh the lock |