make sure port is closed on shutdown
authorChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2018 10:18:14 +0000 (12:18 +0200)
committerChristian Grothoff <christian@grothoff.org>
Mon, 25 Jun 2018 10:18:14 +0000 (12:18 +0200)
src/cadet/gnunet-cadet.c

index 04a595a7bee4e25b04ce5b281e4535b20bfbda5e..a4488244349bffd6746cad068d73e573c141a4c1 100644 (file)
@@ -1,4 +1,4 @@
-/*
+4/*
      This file is part of GNUnet.
      Copyright (C) 2012, 2017 GNUnet e.V.
 
@@ -196,6 +196,11 @@ shutdown_task (void *cls)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Shutdown\n");
+  if (NULL != lp)
+  {
+    GNUNET_CADET_close_port (lp);
+    lp = NULL;
+  }
   if (NULL != ch)
   {
     GNUNET_CADET_channel_destroy (ch);