projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix hang for 2nd use of target with unresolved DNS PAZ-949
[pazpar2-moved-to-github.git]
/
src
/
host.c
diff --git
a/src/host.c
b/src/host.c
index
cece235
..
5c7c15f
100644
(file)
--- a/
src/host.c
+++ b/
src/host.c
@@
-59,6
+59,7
@@
static struct host *create_host(const char *proxy,
host->connections = 0;
host->ipport = 0;
host->mutex = 0;
host->connections = 0;
host->ipport = 0;
host->mutex = 0;
+ host->error = 0;
if (host_getaddrinfo(host, iochan_man))
{
if (host_getaddrinfo(host, iochan_man))
{
@@
-121,6
+122,8
@@
struct host *find_host(database_hosts_t hosts, const char *url,
hosts->hosts = p;
}
}
hosts->hosts = p;
}
}
+ if (p && p->error) /* already resolved error */
+ p = 0;
yaz_mutex_leave(hosts->mutex);
xfree(tproxy);
return p;
yaz_mutex_leave(hosts->mutex);
xfree(tproxy);
return p;