subd: hand through fatal messages as well to callback.

This matters in one case: channeld receiving a bad message is a
permenant failure, whereas losing a connection is transient.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-06-20 15:49:03 +09:30
parent 15405f95e1
commit d95adf7f33
5 changed files with 32 additions and 7 deletions

View File

@@ -59,12 +59,13 @@ static int hsm_msg(struct subd *hsm, const u8 *msg, const int *fds)
: "unknown peer",
tal_hex(msg, badmsg));
/* We don't get called for failed status. */
/* subd already logs fatal errors. */
case WIRE_HSMSTATUS_INIT_FAILED:
case WIRE_HSMSTATUS_WRITEMSG_FAILED:
case WIRE_HSMSTATUS_BAD_REQUEST:
case WIRE_HSMSTATUS_FD_FAILED:
case WIRE_HSMSTATUS_KEY_FAILED:
break;
/* HSM doesn't send these */
case WIRE_HSMCTL_INIT: