Browse Source

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
```
ppa-0.6.1
practicalswift 7 years ago
committed by Rusty Russell
parent
commit
a20cf5463d
  1. 4
      lightningd/jsonrpc.c

4
lightningd/jsonrpc.c

@ -39,7 +39,7 @@ static void destroy_jcon(struct json_connection *jcon)
struct command *cmd; struct command *cmd;
list_for_each(&jcon->commands, cmd, list) { list_for_each(&jcon->commands, cmd, list) {
log_unusual(jcon->log, "Abandoning command"); log_debug(jcon->log, "Abandoning command");
cmd->jcon = NULL; cmd->jcon = NULL;
} }
@ -394,7 +394,7 @@ void command_success(struct command *cmd, struct json_result *result)
struct json_connection *jcon = cmd->jcon; struct json_connection *jcon = cmd->jcon;
if (!jcon) { if (!jcon) {
log_unusual(cmd->ld->log, log_debug(cmd->ld->log,
"Command returned result after jcon close"); "Command returned result after jcon close");
tal_free(cmd); tal_free(cmd);
return; return;

Loading…
Cancel
Save