[Pkg-javascript-commits] [node-leveldown] 70/492: if closing call callback after closed

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit 4c0d1898d5e2c7122d9a4df9a586641eb2c2abab
Author: Raynos <raynos2 at gmail.com>
Date:   Sat Nov 17 14:43:30 2012 -0800

    if closing call callback after closed
---
 lib/levelup.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/levelup.js b/lib/levelup.js
index fede69d..6216f9e 100644
--- a/lib/levelup.js
+++ b/lib/levelup.js
@@ -80,10 +80,10 @@ LevelUP.prototype = {
           callback.apply(null, arguments)
         }.bind(this))
         this._db = null
-      } else if (this.status === "closing" ||
-        this.status === "closed"
-      ) {
+      } else if (this.status === "closed") {
         callback()
+      } else if (this.status === "closing") {
+        this.on("closed", callback)
       } else if (this.status === "opening") {
         this.on("ready", function () {
           this.close(callback)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list