diff --git a/channeld/channel.c b/channeld/channel.c index ee4359611..2a1b03414 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -1995,6 +1995,8 @@ static void init_channel(struct peer *peer) assert(!(fcntl(MASTER_FD, F_GETFL) & O_NONBLOCK)); + status_setup_sync(MASTER_FD); + msg = wire_sync_read(peer, MASTER_FD); if (!fromwire_channel_init(peer, msg, NULL, &peer->chain_hash, @@ -2042,8 +2044,6 @@ static void init_channel(struct peer *peer) status_failed(WIRE_CHANNEL_BAD_COMMAND, "Init: %s", tal_hex(msg, msg)); - status_setup_sync(MASTER_FD); - status_trace("init %s: remote_per_commit = %s, old_remote_per_commit = %s" " next_idx_local = %"PRIu64 " next_idx_remote = %"PRIu64