summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-28 12:19:54 +0100
committerFelix Fietkau <nbd@openwrt.org>2016-01-28 12:19:54 +0100
commit2e0918c7e0612449024caaaa8d44fb2d7a33f5f3 (patch)
treeedc65993a0f373ddcb7ba2d5bf4c0a8522c9b272
parentf50a654323bbfeb0de53aa2178755b282bcc9d22 (diff)
downloaduclient-2e0918c7e0612449024caaaa8d44fb2d7a33f5f3.tar.gz
http: use usock_inet_timeout()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--uclient-http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uclient-http.c b/uclient-http.c
index f080e41..c6336a6 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -123,7 +123,9 @@ static int uclient_do_connect(struct uclient_http *uh, const char *port)
memset(&uh->uc.remote_addr, 0, sizeof(uh->uc.remote_addr));
- fd = usock_inet(USOCK_TCP | uh->usock_flags, uh->uc.url->host, port, &uh->uc.remote_addr);
+ fd = usock_inet_timeout(USOCK_TCP | USOCK_NONBLOCK | uh->usock_flags,
+ uh->uc.url->host, port, &uh->uc.remote_addr,
+ uh->uc.timeout_msecs);
if (fd < 0)
return -1;