lib/daybreak/db.rb in daybreak-0.2.3 vs lib/daybreak/db.rb in daybreak-0.2.4

- old
+ new

@@ -255,10 +255,10 @@ # A handler that will ensure that databases are closed and synced when the # current process exits. # @private def self.exit_handler loop do - db = @@databases_mutex.synchronize { @@databases.first } + db = @@databases_mutex.synchronize { @@databases.shift } break unless db warn "Daybreak database #{db.file} was not closed, state might be inconsistent" begin db.close rescue Exception => ex