Skip to content

Commit f56c53b

Browse files
bugfix: treat shdict entries with ttl equal to 0 as expired.
1 parent 97937e2 commit f56c53b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ env:
4444
- TEST_NGINX_SLEEP=0.006
4545
matrix:
4646
#- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.12
47-
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w
48-
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w USE_PCRE2=Y
47+
- NGINX_VERSION=1.25.3 OPENSSL_VER=1.1.1w
48+
- NGINX_VERSION=1.25.3 OPENSSL_VER=1.1.1w USE_PCRE2=Y
4949

5050
services:
5151
- memcache

src/ngx_stream_lua_shdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ ngx_stream_lua_shdict_lookup(ngx_shm_zone_t *shm_zone, ngx_uint_t hash,
225225

226226
dd("time to live: %lld", (long long) ms);
227227

228-
if (ms < 0) {
228+
if (ms <= 0) {
229229
dd("node already expired");
230230
return NGX_DONE;
231231
}

0 commit comments

Comments
 (0)