aboutsummaryrefslogtreecommitdiff
path: root/src/core/stats.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-09 23:45:21 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-11 11:03:12 -0800
commit713b80f440cb414cd0b856bde0ea1b31f939777f (patch)
tree1186c42418559c85719023bde3e919aa2df7fcef /src/core/stats.c
parentcbe9a27ef7485977fbc7c713376b096b6723da3d (diff)
downloadnng-713b80f440cb414cd0b856bde0ea1b31f939777f.tar.gz
nng-713b80f440cb414cd0b856bde0ea1b31f939777f.tar.bz2
nng-713b80f440cb414cd0b856bde0ea1b31f939777f.zip
refactor initialization/finalization
Applications must now call nng_init(), but they can supply a set of parameters optionally. The code is now safe for multiple libraries to do this concurrently, meaning nng_fini no longer can race against another instance starting up. The nni_init checks on all public APIs are removed now.
Diffstat (limited to 'src/core/stats.c')
-rw-r--r--src/core/stats.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/core/stats.c b/src/core/stats.c
index c049d611..f01f642e 100644
--- a/src/core/stats.c
+++ b/src/core/stats.c
@@ -385,10 +385,6 @@ int
nng_stats_get(nng_stat **statp)
{
#ifdef NNG_ENABLE_STATS
- int rv;
- if ((rv = nni_init()) != 0) {
- return (rv);
- }
return (nni_stat_snapshot(statp, &stats_root));
#else
NNI_ARG_UNUSED(statp);