Commit 57fe8c94df56696aff95bff34ee487883b55c3e6
nits
wanderer committed on 7/6/2017, 2:31:20 AMParent: e8c964ddcc70bc84139efb764d6710b14d6470f5
Files changed
kernel.js | changed |
kernel.js | ||
---|---|---|
@@ -52,11 +52,12 @@ | ||
52 | 52 | while (1) { |
53 | 53 | const message = await this.ports.getNextMessage() |
54 | 54 | if (!message) break |
55 | 55 | |
56 | + // dequqe message | |
56 | 57 | message.fromPort.messages.shift() |
57 | - // if the message we recived had more ticks then we currently have the | |
58 | - // update it | |
58 | + // if the message we recived had more ticks then we currently have the | |
59 | + // update it | |
59 | 60 | if (message._fromTicks > this.ticks) { |
60 | 61 | this.ticks = message._fromTicks |
61 | 62 | this.hypervisor.scheduler.update(this) |
62 | 63 | } |
@@ -80,9 +81,8 @@ | ||
80 | 81 | const responsePort = message.responsePort |
81 | 82 | delete message.responsePort |
82 | 83 | |
83 | 84 | this.ports.addReceivedPorts(message) |
84 | - message._hops++ | |
85 | 85 | |
86 | 86 | if (message.constructor === DeleteMessage) { |
87 | 87 | this.ports._delete(message.fromName) |
88 | 88 | } else { |
@@ -163,8 +163,9 @@ | ||
163 | 163 | * @param {Object} portRef - the port |
164 | 164 | * @param {Message} message - the message |
165 | 165 | */ |
166 | 166 | async send (port, message) { |
167 | + message._hops++ | |
167 | 168 | // set the port that the message came from |
168 | 169 | message._fromTicks = this.ticks |
169 | 170 | this.ports.removeSentPorts(message) |
170 | 171 |
Built with git-ssb-web