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: stop web server before termination

This commit is contained in:
Steffen Vogel 2019-10-29 23:56:55 +01:00
parent e4e12482f6
commit a15850c87c

View file

@ -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");