mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
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>
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user