]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Process review comment: move var to inner block 11601/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 17 Jun 2022 08:43:32 +0000 (10:43 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 17 Jun 2022 08:43:32 +0000 (10:43 +0200)
pdns/syncres.cc

index 5beb4d400e9b5c04c6a18c2f2ae3aed8a6ee92e9..8fdc2bd26f3f3cbfba9e518d7c4722a3d8ce308b 100644 (file)
@@ -1488,8 +1488,8 @@ LWResult::Result SyncRes::asyncresolveWrapper(const ComboAddress& ip, bool ednsM
   {
     auto lock = s_ednsstatus.lock();
     auto ednsstatus = lock->insert(ip).first; // does this include port? YES
-    auto &ind = lock->get<ComboAddress>();
     if (ednsstatus->modeSetAt && ednsstatus->modeSetAt + 3600 < d_now.tv_sec) {
+      auto &ind = lock->get<ComboAddress>();
       lock->reset(ind, ednsstatus);
     }
     mode = ednsstatus->mode;