mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
DoX: Ensure that the response message ID matches the query ID
This commit is contained in:
parent
474ea68d4a
commit
fc45e1b905
1 changed files with 5 additions and 0 deletions
|
@ -97,6 +97,11 @@ public final class DnsOverXmppManager extends Manager {
|
||||||
return errorResponse;
|
return errorResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.id != response.id) {
|
||||||
|
// The ID may not match because the resolver returned a cached result.
|
||||||
|
response = response.asBuilder().setId(query.id).build();
|
||||||
|
}
|
||||||
|
|
||||||
DnsIq dnsIqResult = new DnsIq(response);
|
DnsIq dnsIqResult = new DnsIq(response);
|
||||||
dnsIqResult.setType(IQ.Type.result);
|
dnsIqResult.setType(IQ.Type.result);
|
||||||
return dnsIqResult;
|
return dnsIqResult;
|
||||||
|
|
Loading…
Reference in a new issue