aboutsummaryrefslogtreecommitdiff
path: root/src/transport/tls
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/tls')
-rw-r--r--src/transport/tls/tls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transport/tls/tls.c b/src/transport/tls/tls.c
index 73d1a29b..78fdd622 100644
--- a/src/transport/tls/tls.c
+++ b/src/transport/tls/tls.c
@@ -307,7 +307,7 @@ nni_tls_pipe_recv_cb(void *arg)
// Make sure the message payload is not too big. If it is
// the caller will shut down the pipe.
- if (len > p->rcvmax) {
+ if ((len > p->rcvmax) && (p->rcvmax > 0)) {
rv = NNG_EMSGSIZE;
goto recv_error;
}