Просмотр исходного кода

refine_session: remove redundant call to unregister()

unregister() will get called when the refine session channel disconnects
in session::remove_sub_on_stop(). Calling it here is actually dangerous
and creates rare race conditions.
draoi 2 лет назад
Родитель
Сommit
a16dd562d9
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      src/net/session/refine_session.rs

+ 1 - 3
src/net/session/refine_session.rs

@@ -293,10 +293,8 @@ impl GreylistRefinery {
                     // Add to the whitelist and remove from the greylist.
                     hosts.move_host(url, last_seen, HostColor::White).unwrap();
 
-                    // When move is complete we can safely stop tracking this peer.
-                    hosts.unregister(url);
-
                     debug!(target: "net::refinery", "GreylistRefinery complete!");
+
                     continue
                 }
                 None => {