| @@ 351-366 (lines=16) @@ | ||
| 348 | * |
|
| 349 | * @return bool |
|
| 350 | */ |
|
| 351 | protected function _release_lock() |
|
| 352 | { |
|
| 353 | if (isset($this->_memcached, $this->_lock_key) && $this->_lock) |
|
| 354 | { |
|
| 355 | if ( ! $this->_memcached->delete($this->_lock_key) && $this->_memcached->getResultCode() !== Memcached::RES_NOTFOUND) |
|
| 356 | { |
|
| 357 | log_message('error', 'Session: Error while trying to free lock for '.$this->_lock_key); |
|
| 358 | return FALSE; |
|
| 359 | } |
|
| 360 | ||
| 361 | $this->_lock_key = NULL; |
|
| 362 | $this->_lock = FALSE; |
|
| 363 | } |
|
| 364 | ||
| 365 | return TRUE; |
|
| 366 | } |
|
| 367 | ||
| 368 | } |
|
| 369 | ||
| @@ 367-382 (lines=16) @@ | ||
| 364 | * |
|
| 365 | * @return bool |
|
| 366 | */ |
|
| 367 | protected function _release_lock() |
|
| 368 | { |
|
| 369 | if (isset($this->_redis, $this->_lock_key) && $this->_lock) |
|
| 370 | { |
|
| 371 | if ( ! $this->_redis->delete($this->_lock_key)) |
|
| 372 | { |
|
| 373 | log_message('error', 'Session: Error while trying to free lock for '.$this->_lock_key); |
|
| 374 | return FALSE; |
|
| 375 | } |
|
| 376 | ||
| 377 | $this->_lock_key = NULL; |
|
| 378 | $this->_lock = FALSE; |
|
| 379 | } |
|
| 380 | ||
| 381 | return TRUE; |
|
| 382 | } |
|
| 383 | ||
| 384 | } |
|
| 385 | ||