Skip to content

Commit

Permalink
jsonrpc: mark all JSONRPC connections as notleak.
Browse files Browse the repository at this point in the history
Live connections can confuse us; this happens a lot more when we're
running complex plugins, since they make JSONRPC connections while we're
running our tests.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Dec 20, 2018
1 parent db58d08 commit 3773251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lightningd/jsonrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ void PRINTF_FMT(3, 4) command_fail(struct command *cmd, int code,
void command_still_pending(struct command *cmd)
{
notleak_with_children(cmd);
notleak(cmd->jcon);
cmd->pending = true;
}

Expand Down Expand Up @@ -694,7 +693,8 @@ static struct io_plan *jcon_connected(struct io_conn *conn,
{
struct json_connection *jcon;

jcon = tal(conn, struct json_connection);
/* We live as long as the connection, so we're not a leak. */
jcon = notleak(tal(conn, struct json_connection));
jcon->conn = conn;
jcon->ld = ld;
jcon->used = 0;
Expand Down

0 comments on commit 3773251

Please sign in to comment.