Commit ca4da78423a93192d0c1c35511d0be424d003d8c
feed-summary: fix pressure valve (again! gosh darn heck!)
Matt McKegg committed on 11/2/2016, 4:53:28 AMParent: a5da1caabea6be5eed8baecd05ca37431e9ed9eb
Files changed
lib/feed-summary.js | changed |
lib/feed-summary.js | |||
---|---|---|---|
@@ -119,16 +119,16 @@ | |||
119 | 119 … | } | |
120 | 120 … | ||
121 | 121 … | function reverseForEach (items, fn, cb) { | |
122 | 122 … | var i = items.length - 1 | |
123 | - var start = Date.now() | ||
124 | 123 … | nextBatch() | |
125 | 124 … | ||
126 | 125 … | function nextBatch () { | |
126 … | + var start = Date.now() | ||
127 | 127 … | while (i >= 0) { | |
128 | 128 … | fn(items[i], i) | |
129 | 129 … | i -= 1 | |
130 | - if (Date.now() - start < 10) break | ||
130 … | + if (Date.now() - start > 10) break | ||
131 | 131 … | } | |
132 | 132 … | ||
133 | 133 … | if (i > 0) { | |
134 | 134 … | setImmediate(nextBatch) |
Built with git-ssb-web