lib/fetch/common.c: merge 2.34 and backport a patch for select(2) and SSL.
This commit is contained in:
parent
336897d964
commit
2f3913f3aa
@ -316,6 +316,7 @@ fetch_connect(struct url *url, int af, int verbose)
|
||||
if ((conn = fetch_reopen(sd)) == NULL) {
|
||||
fetch_syserr();
|
||||
close(sd);
|
||||
return NULL;
|
||||
}
|
||||
conn->cache_url = fetchCopyURL(url);
|
||||
conn->cache_af = af;
|
||||
@ -529,6 +530,10 @@ fetch_read(conn_t *conn, char *buf, size_t len)
|
||||
return (-1);
|
||||
}
|
||||
errno = 0;
|
||||
#ifdef WITH_SSL
|
||||
if (conn->ssl && SSL_pending(conn->ssl))
|
||||
break;
|
||||
#endif
|
||||
r = select(conn->sd + 1, &readfds, NULL, NULL, &waittv);
|
||||
if (r == -1) {
|
||||
if (errno == EINTR && fetchRestartCalls)
|
||||
|
Loading…
Reference in New Issue
Block a user