Skip to content

Commit

Permalink
explicitly set address to work around nodejs/node#5398
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Feb 23, 2016
1 parent dd3e183 commit 9306607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ DNS.prototype.response = function (query, response, port, host) {
response.id = query.id

var buffer = packet.encode(response)
this.socket.send(buffer, 0, buffer.length, port, host)
this.socket.send(buffer, 0, buffer.length, port, host || '127.0.0.1')
}

DNS.prototype.cancel = function (id) {
Expand Down Expand Up @@ -189,7 +189,7 @@ DNS.prototype.query = function (query, port, host, cb) {
host: host
}

this.socket.send(buffer, 0, buffer.length, port, host)
this.socket.send(buffer, 0, buffer.length, port, host || '127.0.0.1')
return query.id
}

Expand Down

0 comments on commit 9306607

Please sign in to comment.