Permalink
Browse files

Do not keep archived threads around in memory.

  • Loading branch information...
1 parent c2a04b6 commit e0afce64c925360f2ddd9eea83d4b8f2063cd49c @eksopl committed Oct 12, 2014
@@ -226,6 +226,11 @@ public void run() {
mediaUpdates.put(mediaPost);
}
} catch(InterruptedException e) { }
+
+ if(post.isArchived()) {
+ debug(TALK, newTopic.getNum() + ": archived");
+ topics.remove(newTopic.getNum());
+ }
}
newTopic.purgePosts();
newTopic.lock.writeLock().unlock();
@@ -198,6 +198,7 @@ private Post makePostFromJson(PostJson pj) throws ContentParseException {
p.setDeleted(false);
p.setSticky(pj.isSticky());
p.setClosed(pj.isClosed() && !pj.isArchived());
+ p.setArchived(pj.isArchived());
p.setCapcode(capcode);
p.setPosterHash(posterHash);
p.setPosterCountry(posterCountry);

0 comments on commit e0afce6

Please sign in to comment.