🐛 fix: presence not showing after re-enable

This commit is contained in:
2026-06-15 14:23:35 +07:00
parent dd536d1e2d
commit 0998de78d2
2 changed files with 32 additions and 10 deletions
+7 -2
View File
@@ -388,9 +388,14 @@ export class RpcRelay extends EventEmitter {
let mirror = this.mirrors.get(index)
if (!mirror) {
mirror = new MirrorConnection(mirrorPath, handshakePayload, () =>
this.mirrors.delete(index)
const newMirror: MirrorConnection = new MirrorConnection(
mirrorPath,
handshakePayload,
() => {
if (this.mirrors.get(index) === newMirror) this.mirrors.delete(index)
}
)
mirror = newMirror
this.mirrors.set(index, mirror)
if (frame.op === OP_HANDSHAKE) continue // handshake already sent on connect
}