https://gitlab.synchro.net/main/sbbs/-/merge_requests/714#note_9878
Good catch on both counts — thank you for the thorough analysis and for running the measurements.
The visited set is now in. `seen{}` is seeded with `this.nick` before the BFS loop so a self-referential `linkparent` can't re-enqueue the root, and the same guard terminates any `linkparent` cycle of arbitrary length. The `(Servers[i] !== this)` check from master is redundant with `seen` and has been left out as you suggested.
The minor point about local-child socket cleanup is noted. In a reachable topology local children can't exist (a local server would be `this` or a direct peer, not a deeper child), but I've left a comment in the BFS loop so the assumption is at least visible.
Rebased cleanly onto master. Should be mergeable now.
---
ï¿ Synchronet ï¿ Vertrauen ï¿ Home of Synchronet ï¿ [vert/cvs/bbs].synchro.net