You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2023/06/20 16:04:13 UTC
svn commit: r1910519 - /httpd/httpd/trunk/support/ab.c
Author: ylavic
Date: Tue Jun 20 16:04:12 2023
New Revision: 1910519
URL: http://svn.apache.org/viewvc?rev=1910519&view=rev
Log:
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.
Modified:
httpd/httpd/trunk/support/ab.c
Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1910519&r1=1910518&r2=1910519&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Tue Jun 20 16:04:12 2023
@@ -599,10 +599,20 @@ static int set_polled_events(struct conn
{
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;
}