mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 23:54:22 +01:00
Once we read a command, we are supposed to io_wait until it finishes. However, we are actually woken in two places: when it's complete (which is correct), and when it's written out (which is wrong). We don't care when it's written out, only when it's finished: refactor to make json_done() free and NULL the old ->current, rather than have the callers do it. Now it's clear that it's ready for both new output and new input. Fixes: #934 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>