1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

pipe: fix segfault on shutdown

This commit is contained in:
Georg Reinke 2017-06-14 13:01:51 +02:00
parent 6265c39ce2
commit d7bf6c2370

View file

@ -60,8 +60,6 @@ pthread_t ptid; /**< Parent thread id */
static void quit(int signal, siginfo_t *sinfo, void *ctx)
{
int ret;
if (recvv.started) {
pthread_cancel(recvv.thread);
pthread_join(recvv.thread, NULL);
@ -74,11 +72,8 @@ static void quit(int signal, siginfo_t *sinfo, void *ctx)
pool_destroy(&sendd.pool);
}
ret = super_node_stop(&sn);
if (ret)
error("Failed to stop super-node");
super_node_destroy(&sn);
node_stop(node);
node_destroy(node);
info(GRN("Goodbye!"));
exit(EXIT_SUCCESS);