diff --git a/channeld/channel.c b/channeld/channel.c index ee9a5acfc..9f70d6618 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -2020,6 +2021,8 @@ static void init_channel(struct peer *peer) u8 *msg; u32 feerate_per_kw; + assert(!(fcntl(REQ_FD, F_GETFL) & O_NONBLOCK)); + msg = wire_sync_read(peer, REQ_FD); if (!fromwire_channel_init(peer, msg, NULL, &peer->chain_hash,