We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34057ed commit 90cb0d8Copy full SHA for 90cb0d8
lib/feedsub.js
@@ -290,15 +290,18 @@ module.exports = class FeedReader extends EventEmitter {
290
291
req.pipe(parser);
292
293
- req.on('end', () => {
+ const onEnd = () => {
294
if (ended) { return; }
295
// Process items in descending order if no order found at end.
296
if (sortOrder === 0 && newItems.length === 0) {
297
items.forEach(getOlderItem);
298
}
299
success();
300
this.first = false;
301
- });
+ };
302
+
303
+ req.on('close', onEnd);
304
+ req.on('end', onEnd);
305
});
306
307
req.on('error', error.bind(null, false));
0 commit comments