txlyre 3 years ago
parent
commit
c6d3f06285
1 changed files with 3 additions and 1 deletions
  1. 3 1
      yafn/yafn.py

+ 3 - 1
yafn/yafn.py

@@ -716,7 +716,9 @@ class Connection:
     remote_pubkey = RSA.import_key(data[10:]).public_key()
     remote_uid = generate_uid(remote_pubkey)
 
-    if remote_uid == self._peer.uid or remote_uid in self._peer.connections:
+    if remote_uid == self._peer.uid or remote_uid in [
+      conn.uid for conn in self._peer.connections.copy() if conn.is_ok
+    ]:
       self._dont_reconnect = True
 
       raise YAFNError