diff --git a/bin/dig.js b/bin/dig.js index 03e2dcd..c6c7296 100755 --- a/bin/dig.js +++ b/bin/dig.js @@ -127,8 +127,8 @@ function request(query, opts) { }); handlers.onError = function (err) { - console.error("error:", err.stack); - server.close(); + console.error("error:", err.stack); + server.close(); }; handlers.onMessage = function (nb) { var packet = dnsjs.DNSPacket.parse(nb.buffer.slice(nb.byteOffset, nb.byteOffset + nb.byteLength)); @@ -271,7 +271,7 @@ cli.main(function (args, cli) { process.exit(1); return; } - cli.nameserver = cli.n = arg; + cli.nameserver = cli.n = arg.substr(1); return; }