Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Explicitly close the journal file when done reading instead of waitin…
Browse files Browse the repository at this point in the history
…g for the GC to do it.
  • Loading branch information
rcohen committed Sep 23, 2011
1 parent da18a2f commit ebd4b78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/scala/net/lag/kestrel/Journal.scala
Expand Up @@ -209,6 +209,7 @@ class Journal(queuePath: String, queueName: String, syncJournal: => Boolean, mul
f(item)
case (JournalItem.EndOfFile, _) =>
// move to next file and try again.
rj.close
readerFilename = Journal.journalAfter(new File(queuePath), queueName, readerFilename.get)
reader = Some(new FileInputStream(new File(queuePath, readerFilename.get)).getChannel)
fillReadBehind(f)
Expand Down

0 comments on commit ebd4b78

Please sign in to comment.