Skip to content

Commit

Permalink
fix: test fails after linux open with fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Feb 11, 2024
1 parent 5f846d7 commit 5821ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/NodeConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ define(function (require, exports, module) {
* @return {boolean}
*/
function isNodeReady() {
return isNodeAvailable() && window.PhNodeEngine.nodeReady;
return isNodeAvailable() && window.isNodeReady;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/node-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ function nodeLoader() {
window.PhNodeEngine = {
createNodeConnector,
setInspectEnabled,
isInspectEnabled,
nodeReady: false
isInspectEnabled
};
window.isNodeReady = false;

window.__TAURI__.path.resolveResource("src-node/index.js")
.then(async nodeSrcPath=>{
Expand All @@ -630,7 +630,7 @@ function nodeLoader() {
command = window.__TAURI__.shell.Command.sidecar('phnode', argsArray);
command.on('close', data => {
window.isNodeTerminated = true;
window.PhNodeEngine.nodeReady = false;
window.isNodeReady = false;
nodeTerminationResolve();
console.log(`PhNode: command finished with code ${data.code} and signal ${data.signal}`);
if(!resolved) {
Expand All @@ -639,7 +639,7 @@ function nodeLoader() {
});
command.on('error', error => {
window.isNodeTerminated = true;
window.PhNodeEngine.nodeReady = false;
window.isNodeReady = false;
nodeTerminationResolve();
console.error(`PhNode: command error: "${error}"`);
if(!resolved) {
Expand Down Expand Up @@ -697,7 +697,7 @@ function nodeLoader() {
fs.setNodeWSEndpoint(message.phoenixFSURL);
fs.forceUseNodeWSEndpoint(true);
setNodeWSEndpoint(message.phoenixNodeURL);
window.PhNodeEngine.nodeReady = true;
window.isNodeReady = true;
resolve(message);
// node is designed such that it is not required at boot time to lower startup time.
// Keep this so to increase boot speed.
Expand Down

0 comments on commit 5821ec6

Please sign in to comment.