@remix_labs/machine-starter 2.12927.0-dev → 2.12933.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common.js CHANGED
@@ -74,8 +74,12 @@ function killVM(vmID) {
74
74
  let payload = { _rmx_type:"msg_vm_register", id: vmID, alive: false };
75
75
  last_hub.newChannel().then(channel => {
76
76
  let msg = channel.newJSONMessage("msg_vm_register", "vm", payload);
77
- channel.publish(topic + "/announce", msg, true)
78
- }).then(_ => worker.terminate())
77
+ channel.publish(topic + "/announce", msg, true).then(_ => {
78
+ channel.disconnect("vm_" + vmID);
79
+ })
80
+ }).then(() => {
81
+ worker.terminate()
82
+ });
79
83
  } else {
80
84
  worker.terminate()
81
85
  }
@@ -133,7 +137,7 @@ async function StartWASM2(hub, config, getWorker) {
133
137
  console.log("[machine-starter] Call MixExplain() for explaining debug levels, and MixSetMask(m) for changing these")
134
138
  };
135
139
  last_hub = hub;
136
- let channel = await hub.newChannel();
140
+ let channel = await hub.newChannel("vm_" + config.vmID);
137
141
  // injected by either index.js or node.js
138
142
  let worker = await getWorker();
139
143
  if (workers[config.vmID] || ffiLoops[config.vmID])
@@ -387,7 +391,7 @@ async function starterFFIsMessageLoop(hub, config, starterFFIs, terminate) {
387
391
  sub.next().then((msg) => ({msg})),
388
392
  terminate.then(() => ({terminated: true})),
389
393
  ]);
390
- if (terminated) {
394
+ if (terminated || msg.eof) {
391
395
  // console.log("[machine-starter] terminate FFI loop", vmID);
392
396
  return;
393
397
  }
@@ -447,7 +451,7 @@ async function blobsMessageLoop(hub, config, terminate) {
447
451
  sub.next().then((msg) => ({msg})),
448
452
  terminate.then(() => ({terminated: true})),
449
453
  ]);
450
- if (terminated) {
454
+ if (terminated || msg.eof) {
451
455
  // console.log("[machine-starter] terminate blobs loop", vmID);
452
456
  return;
453
457
  }
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "12927";
1
+ var GROOVEBOX_BUILD = "12933";
2
2
  export { GROOVEBOX_BUILD }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix_labs/machine-starter",
3
- "version": "2.12927.0-dev",
3
+ "version": "2.12933.0-dev",
4
4
  "description": "start the groove",
5
5
  "main": "node.js",
6
6
  "browser": "index.js",
@@ -11,7 +11,7 @@
11
11
  "author": "Remixlabs staff",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@remix_labs/hub-client": "2.12927.0-dev",
14
+ "@remix_labs/hub-client": "2.12933.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },