Skip to content

Commit c07deef

Browse files
committed
Fix duplicate close in write benchmark
1 parent f399ce5 commit c07deef

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

benchmarks/write.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ exports.run = function (factory, stream, options) {
5353
}
5454

5555
function write () {
56-
if (totalWrites++ === options.n) {
57-
db.close(function () {
58-
report(Date.now() - startTime)
59-
})
60-
}
61-
56+
if (totalWrites++ === options.n) return report(Date.now() - startTime)
6257
if (inProgress >= options.concurrency || totalWrites > options.n) return
6358

6459
inProgress++

0 commit comments

Comments
 (0)