mirror of
https://github.com/mirror/wget.git
synced 2025-01-05 09:50:27 +08:00
Set sock variable to -1 if no persistent conn exists
Wget should set sock variable to -1 if no persistent connection exists. Function persistent_available_p() tests persistent connection but if test_socket_open() fails it closes the socket but will not set sock variable to -1. After returning from persistent_available_p() it is possible that sock has still value of already closed connection. Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
c9c0e4c641
commit
8760123cee
@ -1,4 +1,9 @@
|
|||||||
2013-04-26 Tomas Hozza <thozza@redhat.com> (tiny change)
|
2013-03-20 Tomas Hozza <thozza@redhat.com>
|
||||||
|
|
||||||
|
* http.c (gethttp): Set "sock" to -1 if it's not and we have no
|
||||||
|
persistent connection
|
||||||
|
|
||||||
|
2013-04-26 Tomas Hozza <thozza@redhat.com>
|
||||||
|
|
||||||
* log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message
|
* log.c (redirect_output): Use DEFAULT_LOGFILE in diagnostic message
|
||||||
when `logfile' is NULL.
|
when `logfile' is NULL.
|
||||||
|
@ -1983,6 +1983,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
|||||||
exec_name, quote (relevant->host));
|
exec_name, quote (relevant->host));
|
||||||
return HOSTERR;
|
return HOSTERR;
|
||||||
}
|
}
|
||||||
|
else if (sock != -1)
|
||||||
|
{
|
||||||
|
sock = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sock < 0)
|
if (sock < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user