summaryrefslogtreecommitdiffstats
path: root/news
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-03-18 13:40:57 +0100
committertv <tv@nomic.retiolum>2014-03-18 13:40:57 +0100
commit23e4a479b1da9b2923c4b98e0651722a8535f669 (patch)
tree3d3fae84e362a4125d67976d2dfd82d12739f4dc /news
parent380b990f35f7730bd1b67db37897c9718cf72100 (diff)
newsbot.js: continue loop on error
Diffstat (limited to 'news')
-rw-r--r--news/newsbot.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/news/newsbot.js b/news/newsbot.js
index 80bb95b1..2d8b68f5 100644
--- a/news/newsbot.js
+++ b/news/newsbot.js
@@ -140,6 +140,7 @@ function create_feedbot (nick, uri, channels) {
feedparser.on('error', function (error) {
broadcast('4feedparser ' + error)
+ return continue_loop()
})
feedparser.on('readable', function () {
for (var item; item = this.read(); ) {
@@ -161,8 +162,12 @@ function create_feedbot (nick, uri, channels) {
client.lastItems[item.title] = true
})
- return setTimeout(loop_feedparser, feedbot_loop_delay)
+ return continue_loop()
})
+
+ function continue_loop () {
+ setTimeout(loop_feedparser, feedbot_loop_delay)
+ }
}
function deaf_myself () {
client.send('mode', nick, '+D')