Fix async node_helper stopping electron start (#3021)

Async node_helper dont have to finish immediately in loadModules. So the
start callback in the app.js with the config isnt called for some time.
But the electron ready event can already be fired in the meantime.

This lead to the electron app starting but without a config (which is
provded by the node_helper callback) therefor crashing.

This PR fixes #2487 by moving the callback call out of the loadModules
block, therefor the config is provided in time.

If any new async node_helper doesnt like this, we will see it :-)

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck 2023-01-26 19:44:54 +01:00 committed by GitHub
parent a8dc563a31
commit ed90f0546f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -39,7 +39,8 @@ _This release is scheduled to be released on 2023-04-01._
- Fix message display with HTML code into alert module (#2828)
- Fix typo into french translation
- Yr wind direction is no longer inverted
- The wind direction arrow now points in the direction the wind is flowing, not into the wind.
- Fix async node_helper stopping electron start (#2487)
- The wind direction arrow now points in the direction the wind is flowing, not into the wind (#3019)
## [2.22.0] - 2023-01-01

View File

@ -257,12 +257,13 @@ function App() {
});
Log.log("Sockets connected & modules started ...");
});
});
if (typeof callback === "function") {
callback(config);
}
});
});
});
};
/**