From 5415eaaf6071ec75251253b7bd66bd40875d78bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simon=20D=C3=A9saulniers?= <sim.desaulniers@gmail.com>
Date: Mon, 29 Aug 2016 14:10:41 -0400
Subject: [PATCH] dht: consider probe query in announce time

---
 src/dht.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/dht.cpp b/src/dht.cpp
index 1bce7b90..2e30b093 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -404,9 +404,10 @@ 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 (ack == acked.cend() or not ack->second or ack->second->pending()) ?
-                time_point::max() :
-                ack->second->reply_time + type.expiration - REANNOUNCE_MARGIN;
+        return ((gs != getStatus.cend() and gs->second and gs->second->pending())
+                or ack == acked.cend() or not ack->second or ack->second->pending()) ?
+                    time_point::max() :
+                    ack->second->reply_time + type.expiration - REANNOUNCE_MARGIN;
     }
 
     /**
-- 
GitLab