From: Adam Dickmeiss Date: Fri, 23 Apr 2010 11:54:21 +0000 (+0200) Subject: Avoid client_set_state on destroyed client X-Git-Tag: v1.4.0~19 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=1498181abb059f78afc0ad4f7bcea0b5c13c7964;p=pazpar2-moved-to-github.git Avoid client_set_state on destroyed client Call client_set_state before connection_destroy because connection_destroy might remove client (reference count 0). --- 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) {