From 35d7449259f5dd54a940f0a91aa281d5e1321841 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 10 Aug 2018 15:49:29 +0930 Subject: [PATCH] connectd: initialize peer->conn. It's only used in one place, but that's enough. Fixes: #1434 Signed-off-by: Rusty Russell --- connectd/connect.c | 5 +++-- tests/test_connection.py | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/connectd/connect.c b/connectd/connect.c index f4dee8a9c..cce4219ec 100644 --- a/connectd/connect.c +++ b/connectd/connect.c @@ -242,14 +242,15 @@ static bool broken_resolver(struct daemon *daemon) return daemon->broken_resolver_response != NULL; } -static struct peer *new_peer(const tal_t *ctx, +static struct peer *new_peer(struct io_conn *conn, struct daemon *daemon, const struct pubkey *their_id, const struct wireaddr_internal *addr, const struct crypto_state *cs) { - struct peer *peer = tal(ctx, struct peer); + struct peer *peer = tal(conn, struct peer); + peer->conn = conn; peer->id = *their_id; peer->addr = *addr; peer->daemon = daemon; diff --git a/tests/test_connection.py b/tests/test_connection.py index acd7f166b..34c757d75 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -311,7 +311,6 @@ def test_reconnect_gossiping(node_factory): l2.daemon.wait_for_log('processing now old peer gone') -@pytest.mark.xfail(strict=False) def test_connect_stresstest(node_factory, executor): # This test is unreliable, but it's better than nothing. l1 = node_factory.get_node(may_reconnect=True)