]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
core: don't close the socket when failing in ap_start_lingering_close().
authorYann Ylavic <ylavic@apache.org>
Thu, 22 Jul 2021 15:33:19 +0000 (15:33 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 22 Jul 2021 15:33:19 +0000 (15:33 +0000)
commit70d7c7b009c1bbdcd046c1620118f580b6886c5c
tree1e370ed53c64fa8f31623736b173721898a699f9
parentd6220affccac4554b6f890b86786884be9a59ce0
core: don't close the socket when failing in ap_start_lingering_close().

* server/connection.c (ap_start_lingering_close): Don't apr_socket_close().

* server/connection.c (ap_lingering_close): Do apr_socket_close() on
  ap_start_lingering_close() failure.

On failure ap_start_lingering_close() did not consistently close the socket,
so the caller had to call apr_socket_close() too with possible/unreliable
EBADF.  The only upstream callers of ap_start_lingering_close() are MPM event
and ap_start_lingering_close(), but any third-party user has this issue so the
change should't break anyone.

Follow up to r1891716.
Github: #208

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891721 13f79535-47bb-0310-9956-ffa450edef68
server/connection.c