Skip to content
Snippets Groups Projects
Commit a7c0b215 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Some debug log output that helps when receiving UDP responses from wrong port

parent e3faf8e6
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,11 @@ function request(host, query, protocol, udp) ...@@ -19,7 +19,11 @@ function request(host, query, protocol, udp)
sock.send(query + "\r\n"); sock.send(query + "\r\n");
var output = []; var output = [];
if(udp) { if(udp) {
output.push(sock.recvfrom().data); var msg = sock.recvfrom();
if(msg) {
log(LOG_DEBUG, "UDP response from port " + msg.port);
output.push(msg.data);
}
} }
else { else {
while(sock.is_connected && !js.terminated) { while(sock.is_connected && !js.terminated) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment