NameServerPool: prefer to return a NoRecordsFound response over a truncated non-error UDP response
This commit is contained in:
@@ -282,7 +282,12 @@ where
|
||||
|
||||
let tcp_err = match tcp_res {
|
||||
res @ Ok(..) => return res.map_err(ProtoError::from),
|
||||
Err(e) => e,
|
||||
Err(e) => match e.kind() {
|
||||
// a NoRecordsFound response contains more details than the truncated UDP
|
||||
// response, like additionals/nameservers
|
||||
ProtoErrorKind::NoRecordsFound { .. } => return Err(ProtoError::from(e)),
|
||||
_ => e,
|
||||
}
|
||||
};
|
||||
|
||||
// Even if the UDP result was truncated, return that
|
||||
|
Reference in New Issue
Block a user