diff options
| author | Aleksei Solovev <solovalex@gmail.com> | 2024-12-05 11:59:32 +0300 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-07 10:28:47 -0500 |
| commit | 513f9d1b15257fdffa630e3a3d3fe85855343e41 (patch) | |
| tree | 92b2d1f176cacdaa3d0d5a4dfa8fb3c285b5d3c3 /src/sp/protocol/survey0 | |
| parent | 6f7dd7e95a0ad79c20304f4fb6079a2b3aa7b12d (diff) | |
| download | nng-513f9d1b15257fdffa630e3a3d3fe85855343e41.tar.gz nng-513f9d1b15257fdffa630e3a3d3fe85855343e41.tar.bz2 nng-513f9d1b15257fdffa630e3a3d3fe85855343e41.zip | |
fixes #1959 Occasional SIGSEGV in nng_recv_aio() on a respondent socket
Diffstat (limited to 'src/sp/protocol/survey0')
| -rw-r--r-- | src/sp/protocol/survey0/respond.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp/protocol/survey0/respond.c b/src/sp/protocol/survey0/respond.c index ad0732c1..ffa6a2dd 100644 --- a/src/sp/protocol/survey0/respond.c +++ b/src/sp/protocol/survey0/respond.c @@ -334,6 +334,10 @@ resp0_pipe_close(void *arg) nni_mtx_lock(&s->mtx); p->closed = true; + if (nni_list_active(&s->recvpipes, p)) { + // We are no longer "receivable". + nni_list_remove(&s->recvpipes, p); + } while ((ctx = nni_list_first(&p->sendq)) != NULL) { nni_aio *aio; nni_msg *msg; |
