Commit 9a207a1ce69e564a67b6833876ce76b4f3258efa
fix a few bugs
wanderer committed on 12/12/2017, 7:47:10 PMParent: e62cd9ffb288088f86f5a80cfd7f8e5dc58a6b5c
Files changed
actor.js | changed |
inbox.js | changed |
tests/index.js | changed |
actor.js | ||
---|---|---|
@@ -95,11 +95,14 @@ | ||
95 | 95 | } |
96 | 96 | |
97 | 97 | static deserializeMetaData (buffer) { |
98 | 98 | const pipe = new Pipe(buffer) |
99 | + const type = leb128.read(pipe) | |
100 | + pipe.read(1) | |
101 | + const nonce = leb128.read(pipe) | |
99 | 102 | return { |
100 | - type: leb128.read(pipe), | |
101 | - nonce: leb128.read(pipe) | |
103 | + nonce, | |
104 | + type | |
102 | 105 | } |
103 | 106 | } |
104 | 107 | |
105 | 108 | /** |
inbox.js | ||
---|---|---|
@@ -82,8 +82,9 @@ | ||
82 | 82 | async _nextMessage (timeout) { |
83 | 83 | await Promise.all([...this.actor._sending.values()]) |
84 | 84 | let message = this._getOldestMessage() |
85 | 85 | if (message === undefined && timeout === 0) { |
86 | + this._gettingNextMessage = false | |
86 | 87 | return |
87 | 88 | } |
88 | 89 | |
89 | 90 | timeout += this.actor.ticks |
tests/index.js | ||
---|---|---|
@@ -299,9 +299,9 @@ | ||
299 | 299 | |
300 | 300 | class testVMContainerB extends BaseContainer { |
301 | 301 | onCreation (m) { |
302 | 302 | const cap = m.caps[0] |
303 | - this.actor.send(cap, new Message({data: 'test'})) | |
303 | + return this.actor.send(cap, new Message({data: 'test'})) | |
304 | 304 | } |
305 | 305 | |
306 | 306 | static get typeId () { |
307 | 307 | return 8 |
Built with git-ssb-web