git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 75371c3617bf1a0ee367d7738f0670f9c81e6590

test

wanderer committed on 4/30/2017, 10:14:26 AM
Parent: 3a2129ef21fb40c0212b10d052749c0437d93ffc

Files changed

kernel.jschanged
portManager.jschanged
kernel.jsView
@@ -128,10 +128,14 @@
128128 }
129129
130130 async send (portRef, message) {
131131 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+ }
134138 return this.hypervisor.send(portRef, message)
135139 }
136140 }
137141
portManager.jsView
@@ -25,11 +25,11 @@
2525
2626 module.exports = class PortManager {
2727 constructor (opts) {
2828 Object.assign(this, opts)
29- this.parentId = {
30- id: this.parentPort.id['/'].parent
31- }
29+ // this.parentId = {
30+ // id: this.parentPort.id['/'].parent
31+ // }
3232 this._portMap = new Map()
3333 }
3434
3535 async start () {

Built with git-ssb-web