diff options
author | Jeff Trawick <trawick@apache.org> | 2003-05-30 12:15:12 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2003-05-30 12:15:12 +0000 |
commit | c1878b8a53861a2985be5b4a904f0982c6764d0c (patch) | |
tree | ddb1832b9d8ed14da385ac51d688401506998714 /network_io | |
parent | a2abf7e1bbd72cc1236c5eea44898adf1051f620 (diff) | |
download | apr-c1878b8a53861a2985be5b4a904f0982c6764d0c.tar.gz |
Fix a bug in socket timeout handling on unix that left the
socket non-blocking after disabling the timeout.
Submitted by: Jacob Craig Lewallen <jlewalle@cs.ucr.edu>
Reviewed by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64520 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r-- | network_io/unix/sockopt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/network_io/unix/sockopt.c b/network_io/unix/sockopt.c index 51f9fd8fe..de2526066 100644 --- a/network_io/unix/sockopt.c +++ b/network_io/unix/sockopt.c @@ -126,6 +126,7 @@ apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) if ((stat = sononblock(sock->socketdes)) != APR_SUCCESS) { return stat; } + apr_set_option(&sock->netmask, APR_SO_NONBLOCK, 1); } } else if (t < 0 && sock->timeout >= 0) { @@ -133,6 +134,7 @@ apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t) if ((stat = soblock(sock->socketdes)) != APR_SUCCESS) { return stat; } + apr_set_option(&sock->netmask, APR_SO_NONBLOCK, 0); } } /* must disable the incomplete read support if we change to a |