Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,12 @@ class Corestore extends ReadyResource {
}

async suspend({ log = noop } = {}) {
await log('Flushing db...')
await log('Corestore suspension requested.')
// If readOnly we don't need to flush
if (!this.storage.readOnly) {
await log('Flushing db...')
await this.storage.db.flush()
await log('Flusing db completed')
await log('Flushing db completed')
}
if (!this.shouldSuspend) return
await log('Suspending db...')
Expand Down
Loading