From d225cfa5c6b721133b61a9ea23ffd5772b21d015 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 31 Mar 2017 00:02:49 -0600 Subject: [PATCH] fix nameserver (by removing prefix) --- bin/dig.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }