Skip to content
Snippets Groups Projects
Commit ba8ea0e6 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Improved handling of connection refused in do_sync_query().

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.41
parent 166f8974
Branches
Tags
No related merge requests found
......@@ -563,6 +563,8 @@ class client
udp->send(nameservers[i % sizeof(nameservers)], 53, s);
while (udp->wait(RETRY_DELAY)) {
// udp->read() can throw an error on connection refused.
catch {
m = udp->read();
if ((m->port == 53) &&
(m->data[0..1] == s[0..1]) &&
......@@ -570,6 +572,7 @@ class client
// Success.
return decode_res(m->data);
}
};
}
}
// Failure.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment