Sfoglia il codice sorgente

net/hosts: Drop q lock when possible.

parazyd 2 anni fa
parent
commit
d9b8bcf84a
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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 {