summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-30 22:49:05 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-08-30 22:49:05 +0000
commit6fc49d16d7fc9c9b5c80bed4b095d2701fb01d90 (patch)
treeac68b0401436e5a627bdb8b497efc22f4c96f811 /data
parent5f6f436a7a06035397383f4477a5dd3b7cd4a995 (diff)
rss plugin: don't care if reschedule fails
A feed watcher may fail to reschedule, for example if it was stopped before completion. Fail graciously warning the user.
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/rss.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb
index ce52420a..41614609 100644
--- a/data/rbot/plugins/rss.rb
+++ b/data/rbot/plugins/rss.rb
@@ -764,13 +764,13 @@ class RSSFeedsPlugin < Plugin
timer = nil
seconds = @bot.config['rss.thread_sleep']
feed.mutex.synchronize do
- timer = @watch[feed.handle]
+ timer = @watch[feed.handle]
seconds = feed.refresh_rate if feed.refresh_rate
end
seconds *= failures + 1
seconds += seconds * (rand(100)-50)/100
debug "watcher for #{feed} going to sleep #{seconds} seconds.."
- @bot.timer.reschedule(timer, seconds)
+ @bot.timer.reschedule(timer, seconds) rescue warning "watcher for #{feed} failed to reschedule: #{$!.inspect}"
}
debug "watcher for #{feed} added"
end