From 79a336d80905380fdf92bdf6ba4bc160e286c98a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 18 Feb 2010 12:53:04 +0000 Subject: [PATCH] only if connected --- src/transport/transport_api.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index b99e8969b..9e326c9aa 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c @@ -1150,7 +1150,8 @@ reconnect (void *cls, n = h->neighbours; while (NULL != n) { - neighbour_disconnect (n); + if (n->is_connected) + neighbour_disconnect (n); n = n->next; } #if DEBUG_TRANSPORT @@ -1485,9 +1486,9 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) GNUNET_i2s (&dim->peer)); #endif n = neighbour_find (h, &dim->peer); - GNUNET_break (n != NULL); + GNUNET_break (n != NULL); if (n != NULL) - neighbour_disconnect (n); + neighbour_disconnect (n); break; case GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK: if (size != sizeof (struct SendOkMessage)) -- 2.25.1