From a1d67fd731c7fdf4af682e551d87b1c7cf6064c2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 31 May 2011 15:24:34 +0000 Subject: fix --- src/datastore/datastore_api.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/datastore/datastore_api.c') diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 624d0cad7..350c35638 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c @@ -315,6 +315,11 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, { struct GNUNET_DATASTORE_QueueEntry *qe; + if (NULL != h->th) + { + GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); + h->th = NULL; + } if (h->client != NULL) { GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); @@ -325,11 +330,6 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, GNUNET_SCHEDULER_cancel (h->reconnect_task); h->reconnect_task = GNUNET_SCHEDULER_NO_TASK; } - if (NULL != h->th) - { - GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); - h->th = NULL; - } while (NULL != (qe = h->queue_head)) { GNUNET_assert (NULL != qe->response_proc); -- cgit v1.2.3