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/core/socket.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/core/socket.h') diff --git a/src/core/socket.h b/src/core/socket.h index 3eb943f4..af8fd97d 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -73,11 +73,8 @@ extern void nni_sock_set_pipe_cb(nni_sock *sock, int, nng_pipe_cb, void *); // sockets (will also return NNG_ENOTSUP). extern int nni_ctx_open(nni_ctx **, nni_sock *); -// nni_ctx_find finds a context given its id. The last argument should -// be true if the context is acquired merely to close it, false otherwise. -// (If the socket for the context is being closed, then this will return -// NNG_ECLOSED unless the final argument is true.) -extern int nni_ctx_find(nni_ctx **, uint32_t, bool); +// nni_ctx_find finds a context given its id. +extern int nni_ctx_find(nni_ctx **, uint32_t); extern void *nni_ctx_proto_data(nni_ctx *); -- cgit v1.2.3-70-g09d2