projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dcafef3
)
Attempt to fix dead-lock (bug #3807): remove from host list and unlock host mutex...
author
Dennis Schafroth
<dennis@indexdata.com>
Wed, 17 Nov 2010 10:16:48 +0000
(11:16 +0100)
committer
Dennis Schafroth
<dennis@indexdata.com>
Wed, 17 Nov 2010 10:16:48 +0000
(11:16 +0100)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index
c55785d
..
44c1fb9
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-140,7
+140,6
@@
static void connection_destroy(struct connection *co)
client_disconnect(co->client);
}
client_disconnect(co->client);
}
- remove_connection_from_host(co);
xfree(co->zproxy);
xfree(co);
connection_use(-1);
xfree(co->zproxy);
xfree(co);
connection_use(-1);
@@
-280,8
+279,9
@@
static void connection_handler(IOCHAN iochan, int event)
a closed connection from the target.. Or, perhaps, an unexpected
package.. We will just close the connection */
yaz_log(YLOG_LOG, "timeout connection %p event=%d", co, event);
a closed connection from the target.. Or, perhaps, an unexpected
package.. We will just close the connection */
yaz_log(YLOG_LOG, "timeout connection %p event=%d", co, event);
- connection_destroy(co);
+ remove_connection_from_host(co);
yaz_mutex_leave(host->mutex);
yaz_mutex_leave(host->mutex);
+ connection_destroy(co);
}
else if (event & EVENT_TIMEOUT)
{
}
else if (event & EVENT_TIMEOUT)
{
@@
-344,6
+344,7
@@
start:
{
if (!host->ipport) /* unresolved */
{
{
if (!host->ipport) /* unresolved */
{
+ remove_connection_from_host(con);
yaz_mutex_leave(host->mutex);
connection_destroy(con);
goto start;
yaz_mutex_leave(host->mutex);
connection_destroy(con);
goto start;
@@
-351,6
+352,7
@@
start:
}
else if (!con->client)
{
}
else if (!con->client)
{
+ remove_connection_from_host(con);
yaz_mutex_leave(host->mutex);
connection_destroy(con);
/* start all over .. at some point it will be NULL */
yaz_mutex_leave(host->mutex);
connection_destroy(con);
/* start all over .. at some point it will be NULL */