Skip to content

Commit

Permalink
Convertion to Buffer is unnecessary and was buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
fidian committed Nov 23, 2011
1 parent d41689c commit aa9abe2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/ndns.js
Original file line number Diff line number Diff line change
Expand Up @@ -1254,12 +1254,7 @@ function DNSParser(buf, start, end) {
this.initialized = false;
return;
}
if(buf instanceof SlowBuffer){
// console.log('Converting ' + buf + '\n');
buf = new Buffer(buf.toString());
console.log(buf);
}
if (!(buf instanceof Buffer)) {
if (!(buf instanceof Buffer) || !(buf instanceOf SlowBuffer)) {
throw new Error("DNSParser: Argument should be a buffer");
}

Expand Down

0 comments on commit aa9abe2

Please sign in to comment.