diff --git a/src/dht.cpp b/src/dht.cpp index 10656b0ef8f56b54ea2c0bc15155e5f699021023..3b5e11df5fbc223e7a7dfd186840c271e07fd406 100644 --- a/src/dht.cpp +++ b/src/dht.cpp @@ -404,7 +404,9 @@ struct Dht::SearchNode { if ((ack == acked.cend() or not ack->second) and (gs == getStatus.cend() or not gs->second or not gs->second->pending())) return time_point::min(); - return gs->second->pending() ? time_point::max() : gs->second->reply_time + type.expiration - REANNOUNCE_MARGIN; + return (ack == acked.cend() or not ack->second or ack->second->pending()) ? + time_point::max() : + ack->second->reply_time + type.expiration - REANNOUNCE_MARGIN; } /**