Ver Fonte

Refresh buckets at DHT initialization without checking serialized
time.

Checking serialized time does not work if you stop aria2 as soon as it
started DHT. The serialized time in dht.dat will be updated, but
buckets are not updated and still old. When you restart aria2 again,
it does not refresh buckets because serialized time is recent.

Tatsuhiro Tsujikawa há 14 anos atrás
pai
commit
f8f651e8db
1 ficheiros alterados com 1 adições e 3 exclusões
  1. 1 3
      src/DHTSetup.cc

+ 1 - 3
src/DHTSetup.cc

@@ -209,9 +209,7 @@ void DHTSetup::setup
           desnodes.begin(), eoi = desnodes.end(); i != eoi; ++i) {
       routingTable->addNode(*i);
     }
-    if(!desnodes.empty() &&
-       deserializer.getSerializedTime().
-       difference() >= DHT_BUCKET_REFRESH_INTERVAL) {
+    if(!desnodes.empty()) {
       SharedHandle<DHTBucketRefreshTask> task
         (static_pointer_cast<DHTBucketRefreshTask>
          (taskFactory->createBucketRefreshTask()));