diff --git a/scan_engine.cc b/scan_engine.cc index 0af5929e3..69a34bbda 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -2172,18 +2172,18 @@ void HostScanStats::markProbeTimedout(list::iterator probeI) { } bool HostScanStats::completed() { - /* If there are probes active or awaiting retransmission, we are not done. */ - if (num_probes_active != 0 || num_probes_waiting_retransmit != 0 - || !probe_bench.empty() || !retry_stack.empty()) { - return false; - } - /* With ping scan, we are done once we know the host is up or down. */ if (USI->ping_scan && ((target->flags & HOST_UP) || (target->flags & HOST_DOWN) || target->weird_responses)) { return true; } + /* If there are probes active or awaiting retransmission, we are not done. */ + if (num_probes_active != 0 || num_probes_waiting_retransmit != 0 + || !probe_bench.empty() || !retry_stack.empty()) { + return false; + } + /* With other types of scan, we are done when there are no more ports to probe. */ return freshPortsLeft() == 0;