mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 23:06:44 +01:00
daemon: fail if we enter an error state.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b76858c1a1
commit
212f8ee022
1 changed files with 7 additions and 0 deletions
|
@ -153,6 +153,13 @@ static void state_single(struct peer *peer,
|
|||
/* Start output if not running already; it will close conn. */
|
||||
if (peer->cond == PEER_CLOSED)
|
||||
io_wake(peer);
|
||||
|
||||
/* FIXME: Some of these should just result in this peer being killed? */
|
||||
if (state_is_error(peer->state)) {
|
||||
log_broken(peer->log, "Entered error state %s",
|
||||
state_name(peer->state));
|
||||
fatal("Peer entered error state");
|
||||
}
|
||||
}
|
||||
|
||||
static void try_command(struct peer *peer)
|
||||
|
|
Loading…
Add table
Reference in a new issue