aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nng.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nng.c b/src/nng.c
index d5ebe607..1034f4dd 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -158,8 +158,14 @@ nng_strerror(int num)
int
nng_pipe_getopt(nng_pipe *pipe, int opt, void *val, size_t *sizep)
{
+ int rv;
NNI_INIT_INT();
- return (nni_pipe_getopt(pipe, opt, val, sizep));
+ rv = nni_pipe_getopt(pipe, opt, val, sizep);
+ if (rv == ENOTSUP) {
+ // Maybe its a generic socket option.
+ rv = nni_socket_getopt(pipe->p_sock, opt, val, sizep);
+ }
+ return (rv);
}