aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-04-24 13:00:53 +0000
committerChristian Grothoff <christian@grothoff.org>2012-04-24 13:00:53 +0000
commit9b284eab1acb9eb220e00aefabf395e1284bdc62 (patch)
tree09706d8d38e712326e367bd1e9936f6b2f6d8a64 /src/statistics
parent719f459ee3694e4cadf491a18b4f98ea2c412a42 (diff)
downloadgnunet-9b284eab1acb9eb220e00aefabf395e1284bdc62.tar.gz
gnunet-9b284eab1acb9eb220e00aefabf395e1284bdc62.zip
-simplify logic, connections no longer die during shutdown
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index db1efb1ab..44e763821 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -907,22 +907,15 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first)
907 h->action_tail, 907 h->action_tail,
908 h->current); 908 h->current);
909 h->do_destroy = GNUNET_YES; 909 h->do_destroy = GNUNET_YES;
910 if ((h->current != NULL) && (h->th == NULL)) 910 if ((h->current != NULL) && (h->th == NULL)&&
911 (NULL != h->client))
911 { 912 {
912 if (NULL == h->client) 913 timeout = GNUNET_TIME_absolute_get_remaining (h->current->timeout);
913 { 914 h->th =
914 /* instant-connect (regardless of back-off) to submit final value */ 915 GNUNET_CLIENT_notify_transmit_ready (h->client, h->current->msize,
915 h->client = GNUNET_CLIENT_connect ("statistics", h->cfg); 916 timeout, GNUNET_YES,
916 } 917 &transmit_action, h);
917 if (NULL != h->client) 918 GNUNET_assert (NULL != h->th);
918 {
919 timeout = GNUNET_TIME_absolute_get_remaining (h->current->timeout);
920 h->th =
921 GNUNET_CLIENT_notify_transmit_ready (h->client, h->current->msize,
922 timeout, GNUNET_YES,
923 &transmit_action, h);
924 GNUNET_assert (NULL != h->th);
925 }
926 } 919 }
927 if (h->th != NULL) 920 if (h->th != NULL)
928 return; /* do not finish destruction just yet */ 921 return; /* do not finish destruction just yet */