Files
ppsspp/Common
Henrik RydgårdandClaude Opus 5 9799085c3a Let more than one thing receive the log stream at a time
The log manager had a single external-callback slot, but the WebSocket
debugger registers one per *connection* - LogBroadcaster is a local in the
per-connection handler. So with two clients attached (the bundled JS debugger
in a browser and Tools/wsdbg, say) the second one to connect silently took the
log stream away from the first, and then whichever disconnected first cleared
the slot and stopped delivery to the other as well. A one-shot wsdbg command is
enough to do it: connect, take the stream, exit, and the long-lived listener
that was watching the log goes quiet with nothing to say why.

Make it a list with add/remove by handle. The dispatch loop holds the lock
across the callbacks so a listener can't be freed while one is running - which
is what lets LogBroadcaster delete its listener straight after removing it.
Enabling and disabling LogOutput::ExternalCallback belongs to the list now, and
disabling only happens when the last callback goes away.

libretro registers one of these too, and never removes it; it just moves to the
new call. It can't actually collide with the debugger - the libretro build
doesn't compile Core/Debugger/WebSocket at all - but there's no reason for it
to keep using an API that only has room for one caller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 15:15:10 -06:00
..
2025-02-11 10:43:39 -06:00
2026-09-02 18:15:17 +02:00
2026-08-31 11:02:32 +02:00
…
2025-08-31 13:37:43 +02:00
…
2026-01-30 14:10:32 +01:00
2026-03-30 11:34:19 -06:00
2026-08-24 09:30:44 +02:00
2024-07-26 14:22:31 +02:00
…
2026-05-16 10:40:08 +02:00
…
…
2026-07-27 18:37:28 +02:00