From 7cfe50605c3c145a9f8cbf1006c6904eff5fb841 Mon Sep 17 00:00:00 2001 From: Darius Kazemi Date: Sat, 13 Apr 2019 13:34:49 -0700 Subject: [PATCH] Adding a timeout to the RSS parser This fixes #22. --- updateFeeds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updateFeeds.js b/updateFeeds.js index 7f0e23b..b68021b 100644 --- a/updateFeeds.js +++ b/updateFeeds.js @@ -5,7 +5,7 @@ const db = new Database('bot-node.db'), Parser = require('rss-parser'), request = require('request'), crypto = require('crypto'), - parser = new Parser(); + parser = new Parser({timeout: 2000}); // get all feeds from DB let feeds = db.prepare('select * from feeds').all();