From 2e0918c7e0612449024caaaa8d44fb2d7a33f5f3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 28 Jan 2016 12:19:54 +0100 Subject: [PATCH] http: use usock_inet_timeout() Signed-off-by: Felix Fietkau --- uclient-http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.25.1