git ssb

10+

Matt McKegg / patchwork



Commit 754c2c529f956adf3d576fbd5ed319dbc2291d59

feed-summary: fix stuck windows

Matt McKegg committed on 11/2/2016, 12:31:10 AM
Parent: 650fccfe928ae39c6023e3e2af686943028bb9af

Files changed

lib/feed-summary.jschanged
lib/feed-summary.jsView
@@ -30,9 +30,9 @@
3030 } else {
3131 var fromTime = last && last.timestamp || Date.now()
3232 last = values[values.length - 1]
3333 groupMessages(values, fromTime, bumpFilter, (err, result) => {
34- if (err) return cb(err)
34 + if (err) throw err
3535 result.forEach(v => pushable.push(v))
3636 pushable.end()
3737 if (!returned) cb && cb()
3838 returned = true
@@ -123,11 +123,12 @@
123123 var start = Date.now()
124124 nextBatch()
125125
126126 function nextBatch () {
127- while (i >= 0 && Date.now() - start < 10) {
127 + while (i >= 0) {
128128 fn(items[i], i)
129129 i -= 1
130 + if (Date.now() - start < 10) break
130131 }
131132
132133 if (i > 0) {
133134 setImmediate(nextBatch)

Built with git-ssb-web