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;