diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-06-25 12:18:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-06-25 12:18:14 +0200 |
commit | 62b7151f1a8ca7276a6ca7094fc846813dcebce4 (patch) | |
tree | 811f93df0f7b3ad260c244e67a0d6476d07d948a | |
parent | c8e74f32dc0ac07571fa4c2f9537920f15d7fa8b (diff) | |
download | gnunet-62b7151f1a8ca7276a6ca7094fc846813dcebce4.tar.gz gnunet-62b7151f1a8ca7276a6ca7094fc846813dcebce4.zip |
make sure port is closed on shutdown
-rw-r--r-- | src/cadet/gnunet-cadet.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 04a595a7b..a44882443 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | 4/* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2012, 2017 GNUnet e.V. | 3 | Copyright (C) 2012, 2017 GNUnet e.V. |
4 | 4 | ||
@@ -196,6 +196,11 @@ shutdown_task (void *cls) | |||
196 | { | 196 | { |
197 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 197 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
198 | "Shutdown\n"); | 198 | "Shutdown\n"); |
199 | if (NULL != lp) | ||
200 | { | ||
201 | GNUNET_CADET_close_port (lp); | ||
202 | lp = NULL; | ||
203 | } | ||
199 | if (NULL != ch) | 204 | if (NULL != ch) |
200 | { | 205 | { |
201 | GNUNET_CADET_channel_destroy (ch); | 206 | GNUNET_CADET_channel_destroy (ch); |