From 488b5b1edfbbdeeaaeff1f73af5d273c73b9deb5 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 11 Sep 2026 02:48:08 +0200 Subject: [PATCH] The OBS log says when the producer attaches and when it goes quiet Co-Authored-By: Claude Fable 5.1 --- plugin/src/ratatoskr_source.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin/src/ratatoskr_source.c b/plugin/src/ratatoskr_source.c index 2613513..bc73a5e 100644 --- a/plugin/src/ratatoskr_source.c +++ b/plugin/src/ratatoskr_source.c @@ -192,6 +192,7 @@ static void *pump_loop(void *data) { struct ratatoskr_source *ctx = data; os_set_thread_name("ratatoskr-pump"); + int attached = 0; while (ctx->pump_running) { int waiting = ratatoskr_receiver_poll(ctx->receiver); if (waiting < 0) { @@ -199,6 +200,14 @@ static void *pump_loop(void *data) os_sleep_ms(50); continue; } + /* The log should say when the producer answered and when it went + * quiet; the core redials on its own either way. */ + int now_attached = ratatoskr_receiver_attached(ctx->receiver); + if (now_attached != attached) { + attached = now_attached; + blog(LOG_INFO, "[ratatoskr] producer %s for %s", attached ? "attached" : "detached, redialling", + ctx->stream_id); + } for (;;) { size_t len = 0; int kind = -1;