aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/survey0/xsurvey.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/survey0/xsurvey.c')
-rw-r--r--src/protocol/survey0/xsurvey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/survey0/xsurvey.c b/src/protocol/survey0/xsurvey.c
index 47ebef3c..db21e688 100644
--- a/src/protocol/survey0/xsurvey.c
+++ b/src/protocol/survey0/xsurvey.c
@@ -166,6 +166,10 @@ xsurv0_pipe_start(void *arg)
xsurv0_pipe *p = arg;
xsurv0_sock *s = p->psock;
+ if (nni_pipe_peer(p->npipe) != NNI_PROTO_RESPONDENT_V0) {
+ return (NNG_EPROTO);
+ }
+
nni_mtx_lock(&s->mtx);
nni_list_append(&s->pipes, p);
nni_mtx_unlock(&s->mtx);