git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 45db6fcc20b66e04a4879ff1dee5fb13df1cc8d3

minro nits

Signed-off-by: wanderer <mjbecze@gmail.com>
wanderer committed on 8/18/2017, 4:33:59 PM
Parent: 66df0eab8d15d49d023146aa317bc8ed5a517cd1

Files changed

portManager.jschanged
portManager.jsView
@@ -137,17 +137,17 @@
137137
138138 message._fromPort = port
139139 message.fromName = name
140140
141- if (port.messages.push(message) === 1) {
141+ const numOfMsg = port.messages.push(message)
142+
143+ if (numOfMsg === 1) {
142144 if (this._isSaturated()) {
143145 this._saturationResolve()
144146 this._saturationPromise = new Promise((resolve, reject) => {
145147 this._saturationResolve = resolve
146148 })
147- }
148-
149- if (message._fromTicks < this._messageTickThreshold) {
149+ } else if (message._fromTicks < this._messageTickThreshold) {
150150 this._oldestMessageResolve(message)
151151 this._oldestMessagePromise = new Promise((resolve, reject) => {
152152 this._oldestMessageResolve = resolve
153153 })
@@ -185,12 +185,8 @@
185185 return port.messages[0]
186186 }
187187 }
188188
189- waitOnPort (port, timeout) {
190-
191- }
192-
193189 /**
194190 * Waits for the the next message if any
195191 * @returns {Promise}
196192 */

Built with git-ssb-web