From 19253927e4cdef79b9af1ff9b364eb646c307744 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Fri, 20 Sep 2019 22:53:30 +0300 Subject: [PATCH] Close db in stack-blower test Cherry-picked from Level/leveldown#668 --- test/stack-blower.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/stack-blower.js b/test/stack-blower.js index 9d464b99..b802b0eb 100644 --- a/test/stack-blower.js +++ b/test/stack-blower.js @@ -21,7 +21,12 @@ if (process.argv[2] === 'run') { try { recurse() } catch (e) { - process.send('Catchable error at depth ' + depth) + // Closing before process exit is normally not needed. This is a + // temporary workaround for Level/leveldown#667. + db.close(function (err) { + if (err) throw err + process.send('Catchable error at depth ' + depth) + }) } }) }