Skip to content

Commit

Permalink
Fix async node_helper stopping electron start (#3021)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rejas and veeck authored Jan 26, 2023
1 parent a8dc563 commit ed90f05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,12 @@ function App() {
});

Log.log("Sockets connected & modules started ...");
if (typeof callback === "function") {
callback(config);
}
});
});

if (typeof callback === "function") {
callback(config);
}
});
};

Expand Down

0 comments on commit ed90f05

Please sign in to comment.