Przeglądaj źródła

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 14 lat temu
rodzic
commit
f8f651e8db
1 zmienionych plików z 1 dodań i 3 usunięć
  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()));