Sync fetch code with libfetch-2.27.
joerg@netbsd libfetch-2.27: The connection sharing didn't handle the case of active transfers correctly and tried to close the connection in that case (PR 42607). Correctly check if there is a transfer going on and just leave the connection alone in that case. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100111192421-5fddbsek3ayi9wm8
This commit is contained in:
parent
ec907d0646
commit
e404632f7e
@ -1083,7 +1083,7 @@ ftp_cached_connect(struct url *url, struct url *purl, const char *flags)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
doc = strdup(url->doc);
|
doc = strdup(url->doc);
|
||||||
if (doc != NULL) {
|
if (doc != NULL) {
|
||||||
if (cached_connection)
|
if (cached_connection && !cached_connection->is_active)
|
||||||
ftp_disconnect(cached_connection);
|
ftp_disconnect(cached_connection);
|
||||||
cached_connection = fetch_ref(conn);
|
cached_connection = fetch_ref(conn);
|
||||||
memcpy(&cached_host, url, sizeof(*url));
|
memcpy(&cached_host, url, sizeof(*url));
|
||||||
|
Loading…
Reference in New Issue
Block a user