aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pair1/pair.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol/pair1/pair.c')
-rw-r--r--src/sp/protocol/pair1/pair.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sp/protocol/pair1/pair.c b/src/sp/protocol/pair1/pair.c
index 401d70d5..1704d537 100644
--- a/src/sp/protocol/pair1/pair.c
+++ b/src/sp/protocol/pair1/pair.c
@@ -1,5 +1,5 @@
//
-// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -265,12 +265,18 @@ pair1_pipe_start(void *arg)
if (nni_pipe_peer(p->pipe) != NNG_PAIR1_PEER) {
BUMP_STAT(&s->stat_reject_mismatch);
// Peer protocol mismatch.
+ nng_log_warn("NNG-PEER-MISMATCH",
+ "Peer protocol mismatch: %d != %d, rejected.",
+ nni_pipe_peer(p->pipe), NNG_PAIR1_PEER);
return (NNG_EPROTO);
}
nni_mtx_lock(&s->mtx);
if (s->p != NULL) {
nni_mtx_unlock(&s->mtx);
+ nng_log_warn("NNG-PAIR-BUSY",
+ "Peer pipe protocol %d is already paired, rejected.",
+ nni_pipe_peer(p->pipe));
BUMP_STAT(&s->stat_reject_already);
return (NNG_EBUSY);
}