From: Nathan S. Evans Date: Tue, 30 Nov 2010 17:06:01 +0000 (+0000) Subject: add comment to explain X-Git-Tag: initial-import-from-subversion-38251~19578 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2e668ea0972cdf91b82ad52ce086df8e42ee04bf;p=oweals%2Fgnunet.git add comment to explain --- diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 53eee2000..f6b96a13e 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -4407,11 +4407,14 @@ handle_transport_notify_disconnect (void *cls, cnm.peer = *peer; send_to_all_clients (&cnm.header, GNUNET_NO, GNUNET_CORE_OPTION_SEND_DISCONNECT); } - if (NULL != n->th) + + /* On transport disconnect transport doesn't cancel requests, so must do so here. */ + if (n->th != NULL) { - GNUNET_TRANSPORT_notify_transmit_ready_cancel (n->th); - n->th = NULL; + GNUNET_TRANSPORT_notify_transmit_ready_cancel(n->th); } + n->th = NULL; + n->is_connected = GNUNET_NO; n->status = PEER_STATE_DOWN; while (NULL != (car = n->active_client_request_head))