aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/survey0/respond.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/survey0/respond.c')
-rw-r--r--src/protocol/survey0/respond.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/survey0/respond.c b/src/protocol/survey0/respond.c
index 7738a8b7..5f833ca6 100644
--- a/src/protocol/survey0/respond.c
+++ b/src/protocol/survey0/respond.c
@@ -341,6 +341,10 @@ resp0_pipe_start(void *arg)
resp0_sock *s = p->psock;
int rv;
+ if (nni_pipe_peer(p->npipe) != NNI_PROTO_SURVEYOR_V0) {
+ return (NNG_EPROTO);
+ }
+
nni_mtx_lock(&s->mtx);
rv = nni_idhash_insert(s->pipes, p->id, p);
nni_mtx_unlock(&s->mtx);