mirror of
https://github.com/mirror/wget.git
synced 2025-03-14 20:00:15 +08:00
Fix possible race condition
This commit is contained in:
parent
fec5bb9e93
commit
74d5c8bfb7
@ -1,3 +1,7 @@
|
||||
2013-06-23 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||
|
||||
* http.c (gethttp): Lock access to `connect_to_host'.
|
||||
|
||||
2013-06-03 Jochen Hein <jochen@jochen.org> (tiny change)
|
||||
|
||||
* main.c (main): Remove double empty space from string.
|
||||
|
@ -2244,7 +2244,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
|
||||
|
||||
if (sock < 0)
|
||||
{
|
||||
PCONN_LOCK();
|
||||
sock = connect_to_host (conn->host, conn->port);
|
||||
PCONN_UNLOCK();
|
||||
if (sock == E_HOST)
|
||||
{
|
||||
request_free (req);
|
||||
|
Loading…
Reference in New Issue
Block a user