From 3e6a44fa65c89652a385906a3c7fe093b43d9f8f Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 10 Jun 2025 16:13:59 +0100 Subject: [PATCH] Fix unit test failures due to timing issue around start/stop lifecyclce --- packages/node_modules/@node-red/runtime/lib/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/runtime/lib/index.js b/packages/node_modules/@node-red/runtime/lib/index.js index 3251ff2fa..1ac43032b 100644 --- a/packages/node_modules/@node-red/runtime/lib/index.js +++ b/packages/node_modules/@node-red/runtime/lib/index.js @@ -237,8 +237,12 @@ function start() { } } return redNodes.loadContextsPlugin().then(function () { - redNodes.loadFlows().then(() => { redNodes.startFlows() }).catch(function(err) {}); started = true; + redNodes.loadFlows().then(() => { + if (started) { + redNodes.startFlows() + } + }).catch(function(err) {}); }); }); });