Skip to content

Commit e220735

Browse files
committed
Merge branch 'rfc-1123' of https://github.com/niclabs/dns-rust into rfc-1123
2 parents 41f908f + f360783 commit e220735

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/async_resolver.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ impl AsyncResolver {
134134
let rcode = header.get_rcode();
135135
if rcode == 0 {
136136
let answer = dns_mgs.get_answer();
137+
if answer.len() == 0 {
138+
Err(ClientError::TemporaryError("no answer found"))?;
139+
}
137140
return Ok(answer);
138141
}
139142
match rcode {

0 commit comments

Comments
 (0)