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:
parent
e4e12482f6
commit
a15850c87c
1 changed files with 8 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue