aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_ssl_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2022-07-15 15:19:32 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2022-07-15 15:19:32 +0300
commit39b84d7a52c2d367d6baba85521c3e7cd0271961 (patch)
tree457546c210939436a3396c3c9ef1f9444780d086 /src/http/modules/ngx_http_ssl_module.c
parentf35475c083d4cfe56647b66387b60c55e25c27d0 (diff)
downloadnginx-39b84d7a52c2d367d6baba85521c3e7cd0271961.tar.gz
nginx-39b84d7a52c2d367d6baba85521c3e7cd0271961.zip
Events: fixed EPOLLRDHUP with FIONREAD (ticket #2367).
When reading exactly rev->available bytes, rev->available might become 0 after FIONREAD usage introduction in efd71d49bde0. On the next call of ngx_readv_chain() on systems with EPOLLRDHUP this resulted in return without any actions, that is, with rev->ready set, and this in turn resulted in no timers set in event pipe, leading to socket leaks. Fix is to reset rev->ready in ngx_readv_chain() when returning due to rev->available being 0 with EPOLLRDHUP, much like it is already done in ngx_unix_recv(). This ensures that if rev->available will become 0, on systems with EPOLLRDHUP support appropriate EPOLLRDHUP-specific handling will happen on the next ngx_readv_chain() call. While here, also synced ngx_readv_chain() to match ngx_unix_recv() and reset rev->ready when returning due to rev->available being 0 with kqueue. This is mostly cosmetic change, as rev->ready is anyway reset when rev->available is set to 0.
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
0 files changed, 0 insertions, 0 deletions