diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-28 11:20:22 -0500 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-07 14:24:02 -0800 |
| commit | 3dfa962c0d43a59d74c7798c65505082a5c69484 (patch) | |
| tree | 9ee10ed99d341c48b02ed5e97409984582980b16 /src/sp | |
| parent | 4f940cec0a6a5bcccd3ff0f389b66c169991968c (diff) | |
| download | nng-3dfa962c0d43a59d74c7798c65505082a5c69484.tar.gz nng-3dfa962c0d43a59d74c7798c65505082a5c69484.tar.bz2 nng-3dfa962c0d43a59d74c7798c65505082a5c69484.zip | |
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?
Diffstat (limited to 'src/sp')
| -rw-r--r-- | src/sp/protocol/pubsub0/sub.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
