mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
lightning-cli: don't consume 100% CPU if lightningd crashes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
88354b79bd
commit
6c07f1365f
1 changed files with 1 additions and 1 deletions
|
@ -572,7 +572,7 @@ static void enable_notifications(int fd)
|
|||
memset(rbuf, 0, sizeof(rbuf));
|
||||
while (!strends(rbuf, "\n\n")) {
|
||||
size_t len = strlen(rbuf);
|
||||
if (cli_read(fd, rbuf + len, sizeof(rbuf) - len) < 0)
|
||||
if (cli_read(fd, rbuf + len, sizeof(rbuf) - len) <= 0)
|
||||
err(ERROR_TALKING_TO_LIGHTNINGD,
|
||||
"Reading enable response");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue