From 2024b175d543b5a36dab4e5a616a11e5ab284d29 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 9 Jan 2017 08:30:41 +0100 Subject: [PATCH] cancel potentially dangling reconnect task --- src/nat/nat_api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c index 5b4c39682..810d35649 100644 --- a/src/nat/nat_api.c +++ b/src/nat/nat_api.c @@ -714,6 +714,11 @@ GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh) GNUNET_MQ_destroy (nh->mq); nh->mq = NULL; } + if (NULL != nh->reconnect_task) + { + GNUNET_SCHEDULER_cancel (nh->reconnect_task); + nh->reconnect_task = NULL; + } GNUNET_free (nh->reg); GNUNET_free (nh); } -- 2.25.1