Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
f2e0c35916
  1. 5
      connectd/connect.c

5
connectd/connect.c

@ -626,7 +626,10 @@ static struct io_plan *ready_for_master(struct io_conn *conn, struct peer *peer)
peer->gfeatures,
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);
send_peer_with_fds(peer, take(msg));
/* In case we set this earlier. */

Loading…
Cancel
Save