summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2023-06-20 18:04:12 +0200
committerYann Ylavic <ylavic@apache.org>2023-06-20 18:04:12 +0200
commitb82e99aadd132b6e6f433e550739c3edc58fb9df (patch)
tree71441b57b6d4d4358fdbea19e6d7840c5831304d /support
parentab: Increase MAX_CONCURRENCY hard limit (from 20K to 200K). (diff)
downloadapache2-b82e99aadd132b6e6f433e550739c3edc58fb9df.tar.xz
apache2-b82e99aadd132b6e6f433e550739c3edc58fb9df.zip
ab: Add POLLERR and POLLHUP to reqevents for implementations that use/need it.
Also, apr_pollset_remove() might return APR_NOTFOUND if a connection is reset while being poll()ed, don't treat it as an error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910519 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/ab.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/support/ab.c b/support/ab.c
index 087cf8a179..4372c9cac9 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -599,10 +599,20 @@ static int set_polled_events(struct connection *c, apr_int16_t new_reqevents)
{
apr_status_t rv;
+ /* Add POLLHUP and POLLERR to reqevents should some pollset
+ * implementations need/use them.
+ */
+ if (new_reqevents != 0) {
+ new_reqevents |= APR_POLLERR;
+ if (new_reqevents & APR_POLLIN) {
+ new_reqevents |= APR_POLLHUP;
+ }
+ }
+
if (c->pollfd.reqevents != new_reqevents) {
if (c->pollfd.reqevents != 0) {
rv = apr_pollset_remove(c->worker->pollset, &c->pollfd);
- if (rv != APR_SUCCESS) {
+ if (rv != APR_SUCCESS && !APR_STATUS_IS_NOTFOUND(rv)) {
graceful_strerror("apr_pollset_remove()", rv);
return 0;
}