diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-26 18:33:06 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-26 18:33:06 -0800 |
| commit | 5183093c001c6e8687ea99c2e027f77f40657e70 (patch) | |
| tree | 3adcbbef644f2cda0f3721b1ba2813a0ce70b307 /src/sp/transport/tcp | |
| parent | c64d0e5309d060cf3726b1a41e85c12b2bc8b39d (diff) | |
| download | nng-5183093c001c6e8687ea99c2e027f77f40657e70.tar.gz nng-5183093c001c6e8687ea99c2e027f77f40657e70.tar.bz2 nng-5183093c001c6e8687ea99c2e027f77f40657e70.zip | |
fix for potential leaking connections
Diffstat (limited to 'src/sp/transport/tcp')
| -rw-r--r-- | src/sp/transport/tcp/tcp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sp/transport/tcp/tcp.c b/src/sp/transport/tcp/tcp.c index c8539c5e..3ce193c5 100644 --- a/src/sp/transport/tcp/tcp.c +++ b/src/sp/transport/tcp/tcp.c @@ -174,7 +174,10 @@ tcptran_pipe_nego_cb(void *arg) int rv; nni_mtx_lock(&ep->mtx); - + if (ep->closed) { + rv = NNG_ECLOSED; + goto error; + } if ((rv = nni_aio_result(aio)) != 0) { goto error; } |
