Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@
Packet.parse = function(buffer) {
const packet = new Packet();
const reader = new Packet.Reader(buffer);
packet.header = Packet.Header.parse(reader);
try {
packet.header = Packet.Header.parse(reader);
} catch(e){

Check failure on line 153 in packet.js

View workflow job for this annotation

GitHub Actions / build

Missing space before opening brace

Check failure on line 153 in packet.js

View workflow job for this annotation

GitHub Actions / build

Expected space(s) after "catch"
debug('node-dns > parse %s error', 'parse', e.message);
return packet;

Check failure on line 155 in packet.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
}
([ // props parser count
[ 'questions', Packet.Question, packet.header.qdcount ],
[ 'answers', Packet.Resource, packet.header.ancount ],
Expand Down
Loading