Commit dab32ddc authored by Jelte Jansen's avatar Jelte Jansen

[master] don't send SERVFAIL if we already sent an answer

the check that we have already sent something if the timeout happens to fire was missing, discussed with Jeremy on jabber
parent c2a34db2
......@@ -352,8 +352,10 @@ public:
// we have an answer or timeout ourselves
isc::resolve::makeErrorMessage(answer_message_,
Rcode::SERVFAIL());
resolvercallback_->success(answer_message_);
answer_sent_ = true;
if (!answer_sent_) {
answer_sent_ = true;
resolvercallback_->success(answer_message_);
}
}
virtual void stop(bool resume) {
......@@ -366,6 +368,7 @@ public:
// until that one comes back to us)
done_ = true;
if (resume && !answer_sent_) {
answer_sent_ = true;
resolvercallback_->success(answer_message_);
} else {
resolvercallback_->failure();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment