Browse Source

jsonrpc: mark all JSONRPC connections as notleak.

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 <rusty@rustcorp.com.au>
plugin-7
Rusty Russell 6 years ago
parent
commit
3773251d4e
  1. 4
      lightningd/jsonrpc.c

4
lightningd/jsonrpc.c

@ -430,7 +430,6 @@ void PRINTF_FMT(3, 4) command_fail(struct command *cmd, int code,
void command_still_pending(struct command *cmd) void command_still_pending(struct command *cmd)
{ {
notleak_with_children(cmd); notleak_with_children(cmd);
notleak(cmd->jcon);
cmd->pending = true; cmd->pending = true;
} }
@ -694,7 +693,8 @@ static struct io_plan *jcon_connected(struct io_conn *conn,
{ {
struct json_connection *jcon; 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->conn = conn;
jcon->ld = ld; jcon->ld = ld;
jcon->used = 0; jcon->used = 0;

Loading…
Cancel
Save