aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputStream_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputStream_http.c')
-rw-r--r--src/inputStream_http.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index 23434beb6..e633b7a66 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -357,7 +357,7 @@ static int initHTTPConnection(InputStream * inStream)
struct addrinfo *ans = NULL;
struct addrinfo *ap = NULL;
struct addrinfo hints;
- int error, flags;
+ int error;
InputStreamHTTPData *data = (InputStreamHTTPData *) inStream->data;
/**
* Setup hints
@@ -397,8 +397,7 @@ static int initHTTPConnection(InputStream * inStream)
return -1;
}
- flags = fcntl(data->sock, F_GETFL, 0);
- fcntl(data->sock, F_SETFL, flags | O_NONBLOCK);
+ set_nonblocking(data->sock);
if (connect(data->sock, ap->ai_addr, ap->ai_addrlen) >= 0
|| errno == EINPROGRESS) {