Explorar el Código

seedsync: unregister() seed address after failed connection

This fixes a bug where failed connections would get stuck in the Connect
state, blocking the seedsync from retrying.
draoi hace 2 años
padre
commit
3cdec217d1
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/net/session/seedsync_session.rs

+ 3 - 0
src/net/session/seedsync_session.rs

@@ -249,6 +249,9 @@ impl Slot {
 
                     self.failed.store(true, SeqCst);
 
+                    // Free up this addr for future operations.
+                    self.p2p().hosts().unregister(&self.addr);
+
                     // Reset the CondVar for future use.
                     self.reset();