mirror of
https://github.com/YuzuZensai/Discord-Presence-Relay.git
synced 2026-09-13 17:01:36 +00:00
🐛 fix: presence not showing after re-enable
This commit is contained in:
+7
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user