diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-09-20 13:24:56 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-09-20 13:24:56 +0000 |
commit | d2815900ef54fc5e465d639928eee36aae5db883 (patch) | |
tree | 8cfa69edf125d3e3236ae085c08acdf96e624fab /include | |
parent | 68f24602fe9be11c0e7c2ec5b4e02833c93f93aa (diff) | |
download | apr-d2815900ef54fc5e465d639928eee36aae5db883.tar.gz |
Remove the APR_SENDFILE_DISCONNECT_SOCKET flag.
There are several problems with this flag:
1. The TCP socket may be subject to the TCP TIME_WAIT state.
That means apr_sock_sendfile() could occupy worker thread
for significant time (30 seconds)
2. With this flag specified, the socket descriptor is removed from the
apr_socket_t and the caller caller is expected to maintain the descriptor
and release it manually, which is particularly error-prone.
See also:
https://lists.apache.org/thread.html/a3c4a03961a4b5842e7f657a15fe777edf5949b768a2807619a104b1@%3Cdev.apr.apache.org%3E
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1867226 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_network_io.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/apr_network_io.h b/include/apr_network_io.h index 1c572fbef..d47592625 100644 --- a/include/apr_network_io.h +++ b/include/apr_network_io.h @@ -281,12 +281,7 @@ struct apr_sockaddr_t { }; #if APR_HAS_SENDFILE -/** - * Support reusing the socket on platforms which support it (from disconnect, - * specifically Win32. - * @remark Optional flag passed into apr_socket_sendfile() - */ -#define APR_SENDFILE_DISCONNECT_SOCKET 1 +/* APR_SENDFILE_DISCONNECT_SOCKET has been removed in APR 2.0. */ #endif /** A structure to encapsulate headers and trailers for apr_socket_sendfile */ |