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

Socket.recv() can return null and undefined

parent 8a9d76c0
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
...@@ -403,7 +403,7 @@ DNS.prototype.handle_response = function(sock) { ...@@ -403,7 +403,7 @@ DNS.prototype.handle_response = function(sock) {
} }
resp = sock.recv(10000); resp = sock.recv(10000);
if (resp === undefined || resp.length < 12) if (resp === undefined || resp === null || resp.length < 12)
return null; return null;
id = string_to_int16(resp); id = string_to_int16(resp);
if (this.outstanding[id] === undefined) 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