txlyre 3 年之前
父节点
当前提交
c6d3f06285
共有 1 个文件被更改,包括 3 次插入1 次删除
  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