summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2013-09-15 01:35:24 +0000
committerJeff Trawick <trawick@apache.org>2013-09-15 01:35:24 +0000
commitdcd48258f51db2e17d6dd8e57c620317cb9ec424 (patch)
treefe65586fec5b6f26f1ab34e5e4de88fe6e0f658a /network_io
parent89da914d5a7df54461d527257edc1412f6d48a70 (diff)
downloadapr-dcd48258f51db2e17d6dd8e57c620317cb9ec424.tar.gz
On Windows, a socket timeout isn't implemented with
non-blocking socket + poll. When a socket is non- blocking and a timeout is set, the non-blocking state must be disabled. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1523384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/win32/sockopt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c
index 3675383d6..7f7a0eda6 100644
--- a/network_io/win32/sockopt.c
+++ b/network_io/win32/sockopt.c
@@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_socket_timeout_set(apr_socket_t *sock, apr_interva
}
else if (t > 0) {
/* Set the socket to blocking if it was previously non-blocking */
- if (sock->timeout == 0) {
+ if (sock->timeout == 0 || apr_is_option_set(sock, APR_SO_NONBLOCK)) {
if ((stat = soblock(sock->socketdes)) != APR_SUCCESS)
return stat;
}