mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
connectd: hack in a gossip flush as a workaround.
We were failing test_closing_torture, with gossipd complaining that it received a malformed packet. This makes it pass, but the real fix is in the next series. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
722dd05e9d
commit
f2e0c35916
@ -626,7 +626,10 @@ static struct io_plan *ready_for_master(struct io_conn *conn, struct peer *peer)
|
|||||||
peer->gfeatures,
|
peer->gfeatures,
|
||||||
peer->lfeatures);
|
peer->lfeatures);
|
||||||
|
|
||||||
/* FIXME: This can leave half-read/written gossip messages! */
|
/* FIXME: This can block (bad!) and anyway we can still have
|
||||||
|
* half-*read* gossip messages! */
|
||||||
|
daemon_conn_sync_flush(&peer->local->gossip_conn);
|
||||||
|
|
||||||
io_close_taken_fd(peer->local->gossip_conn.conn);
|
io_close_taken_fd(peer->local->gossip_conn.conn);
|
||||||
send_peer_with_fds(peer, take(msg));
|
send_peer_with_fds(peer, take(msg));
|
||||||
/* In case we set this earlier. */
|
/* In case we set this earlier. */
|
||||||
|
Loading…
Reference in New Issue
Block a user