Commit 75371c3617bf1a0ee367d7738f0670f9c81e6590
test
wanderer committed on 4/30/2017, 10:14:26 AMParent: 3a2129ef21fb40c0212b10d052749c0437d93ffc
Files changed
kernel.js | changed |
portManager.js | changed |
kernel.js | ||
---|---|---|
@@ -128,10 +128,14 @@ | ||
128 | 128 | } |
129 | 129 | |
130 | 130 | async send (portRef, message) { |
131 | 131 | message._ticks = this.ticks |
132 | - const portInstance = await this.ports.get(portRef) | |
133 | - portInstance.hasSent = true | |
132 | + try { | |
133 | + const portInstance = await this.ports.get(portRef) | |
134 | + portInstance.hasSent = true | |
135 | + } catch (e) { | |
136 | + throw new Error('invalid port referance, which means the port that the port was either moved or destoried') | |
137 | + } | |
134 | 138 | return this.hypervisor.send(portRef, message) |
135 | 139 | } |
136 | 140 | } |
137 | 141 |
portManager.js | ||
---|---|---|
@@ -25,11 +25,11 @@ | ||
25 | 25 | |
26 | 26 | module.exports = class PortManager { |
27 | 27 | constructor (opts) { |
28 | 28 | Object.assign(this, opts) |
29 | - this.parentId = { | |
30 | - id: this.parentPort.id['/'].parent | |
31 | - } | |
29 | + // this.parentId = { | |
30 | + // id: this.parentPort.id['/'].parent | |
31 | + // } | |
32 | 32 | this._portMap = new Map() |
33 | 33 | } |
34 | 34 | |
35 | 35 | async start () { |
Built with git-ssb-web