From 713b80f440cb414cd0b856bde0ea1b31f939777f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 9 Nov 2024 23:45:21 -0800 Subject: 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. --- src/core/stats.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core/stats.c') 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); -- cgit v1.2.3-70-g09d2