Permalink
Browse files

ignore if levelup/read-stream throws becasue we called stream.destroy…

…() twice
  • Loading branch information...
1 parent 2b116ad commit f82277c2e28014a1b59403eb0e36aa21e468c7d9 @dominictarr committed Feb 28, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/db-opener.js
View
@@ -62,7 +62,9 @@ module.exports = function (db) {
stream.once('end' , onReady)
emitter.once('dispose', function () {
- stream.destroy()
+ //levelup/read-stream throws if the stream has already ended
+ //but it's just a user error, not a serious problem.
+ try { stream.destroy() } catch (_) { }
})
//write the update twice,

0 comments on commit f82277c

Please sign in to comment.