Unify socket closers. Don't put them all in one try-catch or some might remain.

This commit is contained in:
Simo Kinnunen
2014-11-17 15:51:57 +09:00
parent f2bcacba00
commit 4ca5230402
5 changed files with 34 additions and 19 deletions

View File

@@ -72,6 +72,11 @@ module.exports = function(options) {
logger.LevelLabel[options.priority])
lifecycle.observe(function() {
sub.close()
try {
sub.close()
}
catch (err) {
// No-op
}
})
}