Skip to content

Commit

Permalink
bugfix: treat shdict entries with ttl equal to 0 as expired.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuizhuhaomeng authored Jul 16, 2024
1 parent 97937e2 commit f56c53b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ env:
- TEST_NGINX_SLEEP=0.006
matrix:
#- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.12
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w
- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w USE_PCRE2=Y
- NGINX_VERSION=1.25.3 OPENSSL_VER=1.1.1w
- NGINX_VERSION=1.25.3 OPENSSL_VER=1.1.1w USE_PCRE2=Y

services:
- memcache
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_stream_lua_shdict.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ ngx_stream_lua_shdict_lookup(ngx_shm_zone_t *shm_zone, ngx_uint_t hash,

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

if (ms < 0) {
if (ms <= 0) {
dd("node already expired");
return NGX_DONE;
}
Expand Down

0 comments on commit f56c53b

Please sign in to comment.