Skip to content

Commit

Permalink
Don't use getLifetime when reading session to allow it to be modified…
Browse files Browse the repository at this point in the history
… before write.
  • Loading branch information
colinmollenhour committed Nov 11, 2016
1 parent 707b81e commit 8b94600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cm/RedisSession/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public function read($sessionId)
if ( ! empty($setData)) {
$this->_redis->hMSet($sessionId, $setData);
}
$this->_redis->expire($sessionId, min($this->getLifeTime(), $this->_maxLifetime));
$this->_redis->expire($sessionId, 3600*6); // Expiration will be set to correct value when session is written
$this->_redis->exec();

// Reset flag in case of multiple session read/write operations
Expand Down

0 comments on commit 8b94600

Please sign in to comment.