Skip to content

Commit

Permalink
fix: improved dnssd error handling
Browse files Browse the repository at this point in the history
Handle errors from dsnsd Advertisements and use a version of
dnssd that does not throw out of band errors. Once
or if DeMille/dnssd.js#13 or something
equivalent makes it to npm we should go back to the
upstream version of dnssd.
  • Loading branch information
tkurki committed Sep 1, 2019
1 parent 55120d2 commit 97ae59f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/mdns.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ module.exports = function mdnsResponder (app) {
type.port
)
const ad = new mdns.Advertisement(type.type, type.port, options)
ad.on('error', err => {
console.log(type.type.name)
console.error(err)
})
ad.start()
ads.push(ad)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"debug": "^4.1.0",
"deep-get-set": "^1.1.0",
"dev-null-stream": "0.0.1",
"dnssd": "^0.4.1",
"dnssd": "tkurki/dnssd.js#44b1347e728e2445f07c5f1aa97e00d2a89be0be",
"errorhandler": "^1.3.0",
"express": "^4.10.4",
"express-namespace": "^0.1.1",
Expand Down

0 comments on commit 97ae59f

Please sign in to comment.