From a20cf5463df486f1c875d1535aeb8f7c326b3006 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 27 Feb 2018 17:41:29 +0100 Subject: [PATCH] Adjust log level for logging disconnected RPC users ("Abandoning command" + "Command returned result after jcon close") The following command can be used to trigger these messages: ``` $ timeout 0.01 cli/lightning-cli connect [insert-syntactically-valid-peer-id-here] 123.123.123.123 # where 123.123.123.123 is unreachable ``` --- lightningd/jsonrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightningd/jsonrpc.c b/lightningd/jsonrpc.c index 492e081f6..f4ef9e24e 100644 --- a/lightningd/jsonrpc.c +++ b/lightningd/jsonrpc.c @@ -39,7 +39,7 @@ static void destroy_jcon(struct json_connection *jcon) struct command *cmd; list_for_each(&jcon->commands, cmd, list) { - log_unusual(jcon->log, "Abandoning command"); + log_debug(jcon->log, "Abandoning command"); cmd->jcon = NULL; } @@ -394,7 +394,7 @@ void command_success(struct command *cmd, struct json_result *result) struct json_connection *jcon = cmd->jcon; if (!jcon) { - log_unusual(cmd->ld->log, + log_debug(cmd->ld->log, "Command returned result after jcon close"); tal_free(cmd); return;