handle bad packet more correctly
This commit is contained in:
parent
313f0a70a6
commit
630fd7efbf
|
@ -27,9 +27,10 @@ module.exports.create = function (cli, dnsd) {
|
|||
|
||||
// TODO pad two bytes for lengths
|
||||
dnsd.onMessage(nb, function (err, newAb, dbgmsg) {
|
||||
var lenbuf = Buffer.from([ newAb.length >> 8, newAb.length & 255 ]);
|
||||
// TODO XXX generate legit error packet
|
||||
if (err) { console.error("Error", err); c.end(); return; }
|
||||
|
||||
var lenbuf = Buffer.from([ newAb.length >> 8, newAb.length & 255 ]);
|
||||
console.log('TCP ' + dbgmsg);
|
||||
|
||||
c.write(lenbuf);
|
||||
|
|
Loading…
Reference in New Issue