From a15850c87cc709538c67491a023e4308a7b2f070 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 29 Oct 2019 23:56:55 +0100 Subject: [PATCH] pipe: stop web server before termination --- src/villas-pipe.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 6848121d8..99b424452 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -484,6 +484,14 @@ check: if (optarg == endptr) if (ret) throw RuntimeError("Failed to stop node type {}: reason={}", node_type_name(node->_vt), ret); +#if defined(WITH_NODE_WEBSOCKET) && defined(WITH_WEB) + /* Only start web subsystem if villas-pipe is used with a websocket node */ + if (node_type(node)->stop == websocket_stop) { + Web *w = sn.getWeb(); + w->stop(); + } +#endif /* WITH_NODE_WEBSOCKET */ + ret = io_close(&io); if (ret) throw RuntimeError("Failed to close IO");