From 67220ca31d2e9f7f8eaa9c45f68cd499931d64a6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 13 Oct 2021 10:57:11 +1030 Subject: [PATCH] offers: fix overzealous BROKEN log. sendonionmessage can fail when sending a reply, either because the reply had a bad first peer, or because it went offline. The latter happens in CI, which is how I found this. Also fixed typo "onio" -> "onion". Signed-off-by: Rusty Russell --- plugins/offers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/offers.c b/plugins/offers.c index b89a12cc4..94c101650 100644 --- a/plugins/offers.c +++ b/plugins/offers.c @@ -31,8 +31,10 @@ static struct command_result *sendonionmessage_error(struct command *cmd, const jsmntok_t *err, void *unused) { - plugin_log(cmd->plugin, LOG_BROKEN, - "sendoniomessage gave JSON error: %.*s", + /* This can happen if the peer goes offline or wasn't directly + * connected: "Unknown first peer" */ + plugin_log(cmd->plugin, LOG_DBG, + "sendonionmessage gave JSON error: %.*s", json_tok_full_len(err), json_tok_full(buf, err)); return command_hook_success(cmd);