diff options
author | Raimo Niskanen <[email protected]> | 2010-05-27 10:34:48 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-01 13:01:46 +0200 |
commit | 5099491894024f3ff575bcc3a71c4ce1f6bc615b (patch) | |
tree | 28e2ac3fca6bfdeb54c468beb53c4d427f100082 /lib/kernel/src/inet_res.erl | |
parent | 256fb889b337781d27642471f16a5c7e0a988d8c (diff) | |
download | otp-5099491894024f3ff575bcc3a71c4ce1f6bc615b.tar.gz otp-5099491894024f3ff575bcc3a71c4ce1f6bc615b.tar.bz2 otp-5099491894024f3ff575bcc3a71c4ce1f6bc615b.zip |
Resolver: stop inet_res leaking ports
Bugfix: when all nameservers return a reply causing decode errors
or when errors enetunreach or econnrefused occured while
contacting them, one or two UDP ports was leaked i.e
left open and forgotten.
Diffstat (limited to 'lib/kernel/src/inet_res.erl')
-rw-r--r-- | lib/kernel/src/inet_res.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kernel/src/inet_res.erl b/lib/kernel/src/inet_res.erl index 9b9e078898..fb8a5f3e71 100644 --- a/lib/kernel/src/inet_res.erl +++ b/lib/kernel/src/inet_res.erl @@ -592,6 +592,7 @@ query_retries(_Q, _NSs, _Timer, Retry, Retry, S) -> query_retries(Q, NSs, Timer, Retry, I, S0) -> Num = length(NSs), if Num =:= 0 -> + udp_close(S0), {error,timeout}; true -> case query_nss(Q, NSs, Timer, Retry, I, S0, []) of |