Mercurial > hg > nginx-quic
view src/http/modules/perl/Makefile.PL @ 8910:f3510cb959d1
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 15 Jul 2022 15:19:32 +0300 |
parents | 0d2956dfc4e6 |
children |
line wrap: on
line source
# Copyright (C) Igor Sysoev # Copyright (C) Nginx, Inc. use 5.006001; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'nginx', VERSION_FROM => 'nginx.pm', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 ABSTRACT_FROM => 'nginx.pm', # retrieve abstract from module AUTHOR => 'Igor Sysoev', CCFLAGS => "$ENV{NGX_PM_CFLAGS}", OPTIMIZE => '-O', LDDLFLAGS => "$ENV{NGX_PM_LDFLAGS}", INC => join(" ", map { m#^/# ? "-I $_" : "-I ../../../../../$_" } (split /\s+/, $ENV{NGX_INCS})), depend => { 'nginx.c' => join(" ", map { m#^/# ? $_ : "../../../../../$_" } (split(/\s+/, $ENV{NGX_DEPS}), "src/http/modules/perl/ngx_http_perl_module.h")) }, PM => { 'nginx.pm' => '$(INST_LIBDIR)/nginx.pm' } );