Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorfisch0920 <fisch0920@gmail.com>2014-05-16 14:17:01 +0400
committerfisch0920 <fisch0920@gmail.com>2014-05-16 14:17:01 +0400
commit8021381b1ab14cfe61e69eef7e8d53b0d8349e9c (patch)
tree3ec1513ada99ada14ca97bfc2a21a1af801931d1 /lib
parenta1afa10e49f95293cb2b36d89f67af6f5f4446ad (diff)
fixed possibility of hanging process on --remove and fixed an error in FSStorage.close
Diffstat (limited to 'lib')
-rw-r--r--lib/fs_storage.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs_storage.js b/lib/fs_storage.js
index 0bb5d42..f07d509 100644
--- a/lib/fs_storage.js
+++ b/lib/fs_storage.js
@@ -186,7 +186,7 @@ FSStorage.prototype.close = function (cb) {
if (i >= self.files.length) return cb()
if (err) return cb(err)
var next = self.files[i++]
- if (!next) return process.nextTick(loop)
+ if (!next || !next.fd) return process.nextTick(loop)
next.fd.close(loop)
}