From: Christian Grothoff Date: Sat, 2 Jun 2012 17:00:43 +0000 (+0000) Subject: -hopefully fixing #2390 X-Git-Tag: initial-import-from-subversion-38251~13271 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de7d8184873d8b25dd81cfcff2d1f3df77060ee8;p=oweals%2Fgnunet.git -hopefully fixing #2390 --- 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 */