Skip to content
Snippets Groups Projects
Commit 5b2a19cd authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Socket.recv() can return null and undefined

parent 771cb5b2
No related branches found
No related tags found
No related merge requests found
......@@ -403,7 +403,7 @@ DNS.prototype.handle_response = function(sock) {
}
resp = sock.recv(10000);
if (resp === undefined || resp.length < 12)
if (resp === undefined || resp === null || resp.length < 12)
return null;
id = string_to_int16(resp);
if (this.outstanding[id] === undefined)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment