From 4c45afafdc00e13a16694e408b0feb522c8ea20c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 14 Jan 2018 14:55:50 +1030 Subject: [PATCH] channeld: handle ping instead of crashing when expecting reestablish. Fixes: #592 Signed-off-by: Rusty Russell --- channeld/channel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/channeld/channel.c b/channeld/channel.c index 219e8dfd7..b01d5be6a 100644 --- a/channeld/channel.c +++ b/channeld/channel.c @@ -1785,6 +1785,11 @@ again: goto again; } + if (fromwire_peektype(msg) == WIRE_PING) { + handle_ping(peer, msg); + goto again; + } + if (!fromwire_channel_reestablish(msg, NULL, &channel_id, &next_local_commitment_number, &next_remote_revocation_number)) {