aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-22 23:51:45 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-22 23:51:45 +0100
commit1108ec482bba414f016b35a45e5d43ff99994b7b (patch)
tree9a6e364e097f04c521d6713127aa0b166a353e08 /src/util
parent435ef0a62ffe830ccee159f430157cfc8cc6a3d4 (diff)
downloadgnunet-1108ec482bba414f016b35a45e5d43ff99994b7b.tar.gz
gnunet-1108ec482bba414f016b35a45e5d43ff99994b7b.zip
fix shutdown sequence on MQ errors
Diffstat (limited to 'src/util')
-rw-r--r--src/util/service_new.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/service_new.c b/src/util/service_new.c
index 731be2cfe..eaaf053b8 100644
--- a/src/util/service_new.c
+++ b/src/util/service_new.c
@@ -1996,8 +1996,9 @@ service_mq_send (struct GNUNET_MQ_Handle *mq,
1996{ 1996{
1997 struct GNUNET_SERVICE_Client *client = impl_state; 1997 struct GNUNET_SERVICE_Client *client = impl_state;
1998 1998
1999 if (NULL != client->drop_task)
2000 return; /* we're going down right now, do not try to send */
1999 GNUNET_assert (NULL == client->send_task); 2001 GNUNET_assert (NULL == client->send_task);
2000 GNUNET_assert (NULL == client->drop_task);
2001 client->msg = msg; 2002 client->msg = msg;
2002 client->msg_pos = 0; 2003 client->msg_pos = 0;
2003 client->send_task 2004 client->send_task
@@ -2466,6 +2467,10 @@ finish_client_drop (void *cls)
2466 struct GNUNET_SERVICE_Client *c = cls; 2467 struct GNUNET_SERVICE_Client *c = cls;
2467 struct GNUNET_SERVICE_Handle *sh = c->sh; 2468 struct GNUNET_SERVICE_Handle *sh = c->sh;
2468 2469
2470 c->drop_task = NULL;
2471 GNUNET_assert (NULL == c->send_task);
2472 GNUNET_assert (NULL == c->recv_task);
2473 GNUNET_assert (NULL == c->warn_task);
2469 GNUNET_MST_destroy (c->mst); 2474 GNUNET_MST_destroy (c->mst);
2470 GNUNET_MQ_destroy (c->mq); 2475 GNUNET_MQ_destroy (c->mq);
2471 if (GNUNET_NO == c->persist) 2476 if (GNUNET_NO == c->persist)