From 3dfa962c0d43a59d74c7798c65505082a5c69484 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 28 Nov 2024 11:20:22 -0500 Subject: ctx: Simplify handling for closed contexts. Once a context has started the process of close, further attempts to close it will return NNG_ECLOSED. What was I thinking to ever do anything else? --- src/sp/protocol/pubsub0/sub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sp/protocol') diff --git a/src/sp/protocol/pubsub0/sub.c b/src/sp/protocol/pubsub0/sub.c index 1b17fcbf..cc1fc397 100644 --- a/src/sp/protocol/pubsub0/sub.c +++ b/src/sp/protocol/pubsub0/sub.c @@ -753,7 +753,7 @@ nng_sub0_ctx_subscribe(nng_ctx id, const void *buf, size_t sz) nni_ctx *c; sub0_ctx *ctx; - if ((rv = nni_ctx_find(&c, id.id, false)) != 0) { + if ((rv = nni_ctx_find(&c, id.id)) != 0) { return (rv); } // validate the socket type @@ -774,7 +774,7 @@ nng_sub0_ctx_unsubscribe(nng_ctx id, const void *buf, size_t sz) nni_ctx *c; sub0_ctx *ctx; - if ((rv = nni_ctx_find(&c, id.id, false)) != 0) { + if ((rv = nni_ctx_find(&c, id.id)) != 0) { return (rv); } // validate the socket type -- cgit v1.2.3-70-g09d2