aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_net.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-06-28 23:07:28 -0700
committerGarrett D'Amore <garrett@damore.org>2017-06-28 23:07:28 -0700
commitfe3c9705072ac8cafecdf2ea6bca4c26f9464824 (patch)
tree07aaea70cbf8bb6af369d5efede475ed03ffdd63 /src/platform/posix/posix_net.c
parent10d748fa6444324878a77cc5749c93b75819ced2 (diff)
downloadnng-fe3c9705072ac8cafecdf2ea6bca4c26f9464824.tar.gz
nng-fe3c9705072ac8cafecdf2ea6bca4c26f9464824.tar.bz2
nng-fe3c9705072ac8cafecdf2ea6bca4c26f9464824.zip
Refactor stop again, closing numerous races (thanks valgrind!)
Diffstat (limited to 'src/platform/posix/posix_net.c')
-rw-r--r--src/platform/posix/posix_net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/platform/posix/posix_net.c b/src/platform/posix/posix_net.c
index c8b7766e..5ae9904a 100644
--- a/src/platform/posix/posix_net.c
+++ b/src/platform/posix/posix_net.c
@@ -299,6 +299,9 @@ nni_plat_tcp_shutdown(nni_plat_tcpsock *tsp)
// (macOS does not see the shtudown).
(void) dup2(nni_plat_devnull, tsp->fd);
}
+ if (tsp->pd != NULL) {
+ nni_posix_pipedesc_close(tsp->pd);
+ }
}