From a1bc737bcc84cda545d6ff3b432235f5f2414f97 Mon Sep 17 00:00:00 2001 From: Dmitry Shifrin Date: Mon, 6 Feb 2023 02:45:26 +0300 Subject: src: sp: tcp: Finish receive aio on close (#1636) Finish receive aio on tcp pipe close --- src/sp/transport/tcp/tcp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2