From: Felix Fietkau Date: Thu, 28 Jan 2016 11:19:54 +0000 (+0100) Subject: http: use usock_inet_timeout() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2e0918c7e0612449024caaaa8d44fb2d7a33f5f3;p=project%2Fuclient.git http: use usock_inet_timeout() Signed-off-by: Felix Fietkau --- 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;