ping: complete JSON RPC ping commands even if one ping gets no response.

We would never complete further ping commands if we had < responses
than pings.  Oops.

Fixes: #1928
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-09-12 05:27:11 +09:30
committed by Christian Decker
parent 4a1bc0f90c
commit 704d30edce
8 changed files with 78 additions and 14 deletions

View File

@@ -176,6 +176,7 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
list_head_init(&ld->waitsendpay_commands);
list_head_init(&ld->sendpay_commands);
list_head_init(&ld->close_commands);
list_head_init(&ld->ping_commands);
/*~ Tal also explicitly supports arrays: it stores the number of
* elements, which can be accessed with tal_count() (or tal_bytelen()