Parcourir la source

net/hosts: Drop q lock when possible.

parazyd il y a 2 ans
Parent
commit
d9b8bcf84a
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/net/hosts/store.rs

+ 1 - 0
src/net/hosts/store.rs

@@ -665,6 +665,7 @@ impl Hosts {
             if *retries == self.settings.hosts_quarantine_limit {
                 debug!(target: "net::hosts::quarantine()", "Reached quarantine limited after {:?}", timer.elapsed());
                 debug!(target: "net::hosts::quarantine()", "Removing from hostlist {}", addr);
+                drop(q);
                 self.downgrade_host(addr, last_seen).await;
             }
         } else {