aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-06-22 13:25:15 -0700
committerGarrett D'Amore <garrett@damore.org>2017-06-22 13:25:15 -0700
commitc9fffa535275ca8b3d4afedf72cb503f909418e8 (patch)
treef1016e8c855c665bd78599cfc38f409455d6d002
parentc45eb380c6a84080fe457eabb1235166020a7a4f (diff)
downloadnng-c9fffa535275ca8b3d4afedf72cb503f909418e8.tar.gz
nng-c9fffa535275ca8b3d4afedf72cb503f909418e8.tar.bz2
nng-c9fffa535275ca8b3d4afedf72cb503f909418e8.zip
Note that we have work to do to properly clean up. TBD.
-rw-r--r--src/core/init.c2
-rw-r--r--src/nng_compat.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/init.c b/src/core/init.c
index c2fe3aff..0b65013a 100644
--- a/src/core/init.c
+++ b/src/core/init.c
@@ -64,6 +64,8 @@ nni_init(void)
void
nni_fini(void)
{
+ // XXX: We should make sure that underlying sockets and
+ // file descriptors are closed. Details TBD.
nni_tran_sys_fini();
nni_ep_sys_fini();
nni_sock_sys_fini();
diff --git a/src/nng_compat.c b/src/nng_compat.c
index ee52a074..41995dd9 100644
--- a/src/nng_compat.c
+++ b/src/nng_compat.c
@@ -741,7 +741,8 @@ nn_device(int s1, int s2)
}
-// You should not use this function if you can help it.
+// nn_term is suitable only for shutting down the entire library,
+// and is not thread-safe with other functions.
void
nn_term(void)
{