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 init order

This commit is contained in:
Steffen Vogel 2019-01-21 22:59:20 +01:00
parent 42e51e04c5
commit c225205713

View file

@ -379,6 +379,8 @@ check: if (optarg == endptr)
if (ret)
throw RuntimeError("Failed to intialize node type {}: reason={}", node_type_name(node_type(node)), ret);
sn.startInterfaces();
ret = node_check(node);
if (ret)
throw RuntimeError("Invalid node configuration");
@ -391,8 +393,6 @@ check: if (optarg == endptr)
if (ret)
throw RuntimeError("Failed to start node {}: reason={}", node_name(node), ret);
sn.startInterfaces();
/* Start threads */
Directions dirs = {
.send = Direction(node, &io, enable_send, limit_send),
@ -428,12 +428,12 @@ check: if (optarg == endptr)
if (ret)
throw RuntimeError("Failed to stop node {}: reason={}", node_name(node), ret);
sn.stopInterfaces();
ret = node_type_stop(node->_vt);
if (ret)
throw RuntimeError("Failed to stop node type {}: reason={}", node_type_name(node->_vt), ret);
sn.stopInterfaces();
ret = io_close(&io);
if (ret)
throw RuntimeError("Failed to close IO");