Skip to content

Commit ed8cb8f

Browse files
bugfix: treat shdict entries with ttl equal to 0 as expired.
1 parent 6f311f8 commit ed8cb8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_http_lua_shdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ ngx_http_lua_shdict_lookup(ngx_shm_zone_t *shm_zone, ngx_uint_t hash,
210210

211211
dd("time to live: %lld", (long long) ms);
212212

213-
if (ms < 0) {
213+
if (ms <= 0) {
214214
dd("node already expired");
215215
return NGX_DONE;
216216
}

0 commit comments

Comments
 (0)