Merge commit 'f0c1525bdb97ec01de16020de939e17aaac0dc03' into dev

This commit is contained in:
Théophile Diot 2024-08-20 12:13:43 +01:00
commit b2d712ed12
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
2 changed files with 6 additions and 4 deletions

View file

@ -44,8 +44,8 @@ env:
- TEST_NGINX_SLEEP=0.006
matrix:
#- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.12
- NGINX_VERSION=1.27.0 OPENSSL_VER=1.1.1w
- NGINX_VERSION=1.27.0 OPENSSL_VER=1.1.1w USE_PCRE2=Y
- NGINX_VERSION=1.27.1 OPENSSL_VER=1.1.1w
- NGINX_VERSION=1.27.1 OPENSSL_VER=1.1.1w USE_PCRE2=Y
services:
- memcache

View file

@ -5595,6 +5595,7 @@ ngx_stream_lua_socket_keepalive_close_handler(ngx_event_t *ev)
ngx_stream_lua_socket_pool_t *spool;
int n;
int err;
char buf[1];
ngx_connection_t *c;
@ -5618,18 +5619,19 @@ ngx_stream_lua_socket_keepalive_close_handler(ngx_event_t *ev)
"check stale events");
n = recv(c->fd, buf, 1, MSG_PEEK);
err = ngx_socket_errno;
#if (NGX_STREAM_SSL)
/* ignore ssl protocol data like change cipher spec */
if (n == 1 && c->ssl != NULL) {
n = c->recv(c, (unsigned char *) buf, 1);
if (n == NGX_AGAIN) {
n = -1;
ngx_socket_errno = NGX_EAGAIN;
err = NGX_EAGAIN;
}
}
#endif /* NGX_STREAM_SSL */
if (n == -1 && ngx_socket_errno == NGX_EAGAIN) {
if (n == -1 && err == NGX_EAGAIN) {
/* stale event */
if (ngx_handle_read_event(c->read, 0) != NGX_OK) {