The OBS log says when the producer attaches and when it goes quiet

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-11 02:48:08 +02:00
commit 488b5b1edf

View file

@ -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;