aboutsummaryrefslogtreecommitdiff
path: root/src/sp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp')
-rw-r--r--src/sp/transport/tcp/tcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sp/transport/tcp/tcp.c b/src/sp/transport/tcp/tcp.c
index 1e2ef733..ee90c80d 100644
--- a/src/sp/transport/tcp/tcp.c
+++ b/src/sp/transport/tcp/tcp.c
@@ -361,6 +361,11 @@ tcptran_pipe_recv_cb(void *arg)
goto recv_error;
}
+ if (p->closed) {
+ rv = NNG_ECLOSED;
+ goto recv_error;
+ }
+
n = nni_aio_count(rxaio);
nni_aio_iov_advance(rxaio, n);
if (nni_aio_iov_count(rxaio) > 0) {