fixing issue where NodeBB hangs if a non-existant topic was requested

This commit is contained in:
Julian Lam
2013-07-05 16:44:11 -04:00
parent 6ac2564bad
commit d1bc8b5d91
4 changed files with 53 additions and 38 deletions

View File

@@ -29,7 +29,9 @@
Feed.updateTopic = function(tid, cid) {
var cache_time_in_seconds = 60;
topics.getTopicWithPosts(tid, 0, function(topicData) {
topics.getTopicWithPosts(tid, 0, function(err, topicData) {
if (err) console.log('Error: Problem saving topic RSS feed', err);
var location = '/topic/' + topicData.slug,
xml_url = '/topic/' + tid + '.rss';