From de7d8184873d8b25dd81cfcff2d1f3df77060ee8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 Jun 2012 17:00:43 +0000 Subject: [PATCH] -hopefully fixing #2390 --- src/util/server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/server.c b/src/util/server.c index 672903486..b1edf2c45 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -1389,7 +1389,13 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) GNUNET_SERVER_notify_transmit_ready_cancel (&client->th); (void) GNUNET_SCHEDULER_add_now (&destroy_connection, client->connection); - GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == client->warn_task); + /* need to cancel again, as it might have been re-added + in the meantime (i.e. during callbacks) */ + if (GNUNET_SCHEDULER_NO_TASK != client->warn_task) + { + GNUNET_SCHEDULER_cancel (client->warn_task); + client->warn_task = GNUNET_SCHEDULER_NO_TASK; + } GNUNET_assert (GNUNET_NO == client->receive_pending); GNUNET_free (client); /* we might be in soft-shutdown, test if we're done */ -- 2.25.1