summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/pair/pair_v1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocol/pair/pair_v1.c b/src/protocol/pair/pair_v1.c
index 6951088e..b76eecbb 100644
--- a/src/protocol/pair/pair_v1.c
+++ b/src/protocol/pair/pair_v1.c
@@ -224,7 +224,7 @@ pair1_pipe_recv_cb(void *arg)
// If we bounced too many times, discard the message, but
// keep getting more.
- if (hdr >= (unsigned) s->ttl) {
+ if (hdr > (unsigned) s->ttl) {
nni_msg_free(msg);
nni_pipe_recv(npipe, &p->aio_recv);
return;
@@ -403,7 +403,7 @@ pair1_sock_setopt(void *arg, int opt, const void *buf, size_t sz)
}
break;
case NNG_OPT_MAXTTL:
- rv = nni_setopt_int(&s->ttl, buf, sz, 0, 255);
+ rv = nni_setopt_int(&s->ttl, buf, sz, 1, 255);
break;
default:
rv = NNG_ENOTSUP;