diff --git a/include/opendht/network_engine.h b/include/opendht/network_engine.h index e85366f24b3e8907d6e31aea6f0e22f505eb3a31..ec4f7e74110fcf8e6713590787b8ff6f28b6f914 100644 --- a/include/opendht/network_engine.h +++ b/include/opendht/network_engine.h @@ -477,10 +477,9 @@ private: return; auto now = scheduler.time(); - if (req->expired(now)) { + if (req->node->isExpired(now) or req->expired(now)) { req->on_expired(req, true); - req->on_expired = {}; - req->on_done = {}; + req->clear(); requests.erase(req->tid); return; } else if (req->attempt_count == 1) {