Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions iocore/hostdb/HostDB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,9 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
if (event == EVENT_INTERVAL) {
if (!action.continuation) {
// give up on insert, it has been too long
// remove_trigger_pending_dns will notify and clean up all requests
// including this one.
remove_trigger_pending_dns();
hostdb_cont_free(this);
return EVENT_DONE;
}
MUTEX_TRY_LOCK(lock, action.mutex, thread);
Expand Down Expand Up @@ -1434,18 +1435,18 @@ HostDBContinuation::dnsEvent(int event, HostEnt *e)
}
}
if (need_to_reschedule) {
remove_trigger_pending_dns();
SET_HANDLER((HostDBContHandler)&HostDBContinuation::probeEvent);
thread->schedule_in(this, HOST_DB_RETRY_PERIOD);
// remove_trigger_pending_dns should kick off the current hostDB too
// No need to explicitly reschedule
remove_trigger_pending_dns();
return EVENT_CONT;
}
}
// wake up everyone else who is waiting
remove_trigger_pending_dns();

// all done
// all done, or at least scheduled to be all done
//
hostdb_cont_free(this);
return EVENT_DONE;
}
}
Expand Down