diff --git a/php_memcached_session.c b/php_memcached_session.c index de8d1651..d1d45b66 100644 --- a/php_memcached_session.c +++ b/php_memcached_session.c @@ -343,7 +343,7 @@ PS_WRITE_FUNC(memcached) } if (PS(gc_maxlifetime) > 0) { - expiration = PS(gc_maxlifetime); + expiration = time(NULL) + PS(gc_maxlifetime); } /* Set the number of write retry attempts to the number of replicas times the number of attempts to remove a server plus the initial write */