Files
XC_VM/src
obscuremindandClaude Opus 5 b37142698a fix(fanout): stop, force and rogue-kill must account for the daemon
Three places where the panel and the fanout daemon disagreed about who
owns a stream's encoder. The first is a showstopper; the second is a
self-inflicted outage; the third is silent.

* stopStream could not stop a supervised stream. It killed the encoder
  pid -- which is precisely the event the daemon's supervisor exists to
  react to, so the daemon started a replacement and the stream came
  straight back. It now releases supervision FIRST, so the daemon lets go
  and kills the encoder itself. (The existing FanoutClient::unregister
  call drops the ingest registration, which is a different thing.)

* The rogue-ffmpeg sweep in cron:streams kills every ffmpeg writing an
  .m3u8 that is not on its active-pid list. That list is built from the
  database pid, read at the top of the pass -- so an encoder the daemon
  restarted a moment later was not on it, and the sweep would shoot a
  perfectly healthy supervised stream and log it as a rogue. The daemon's
  own reported pid is now added to the list.

* force_stream wrote a `<id>.force` signal file, which only
  MonitorCommand ever read -- and it stands down for supervised streams.
  Forcing a source therefore did nothing at all. It now calls the daemon
  and falls back to the file when the daemon does not hold the stream or
  cannot be reached.

All three degrade to exactly the previous behaviour when the daemon is
unreachable.

Verified: php -l clean on the changed files and across all of src/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 21:45:06 +01:00
..
2025-07-10 20:01:56 +03:00
2025-09-11 22:09:58 +03:00
2025-07-10 20:01:56 +03:00
2025-07-10 20:01:56 +03:00