From 1498181abb059f78afc0ad4f7bcea0b5c13c7964 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 23 Apr 2010 13:54:21 +0200 Subject: [PATCH] Avoid client_set_state on destroyed client Call client_set_state before connection_destroy because connection_destroy might remove client (reference count 0). --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index e4c05f1..f1c19ec 100644 --- a/src/connection.c +++ b/src/connection.c @@ -258,8 +258,8 @@ static void connection_handler(IOCHAN iochan, int event) { yaz_log(YLOG_WARN, "connect timeout %s", client_get_url(cl)); - connection_destroy(co); client_set_state(cl, Client_Error); + connection_destroy(co); } else if (client_get_state(co->client) == Client_Idle) { -- 1.7.10.4