mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
lightningd: fix logging of peer death.
We used level -1 to mean "append to log", but that doesn't actually work, and results in an assert if we try to prune the logs: lightningd: daemon/pseudorand.c:36: pseudorand: Assertion `max' failed. Expose logv_add and use that. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -112,7 +112,7 @@ void peer_fail(struct peer *peer, const char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
log_info(peer->log, "Peer failure in %s: ",
|
||||
peer_state_name(peer->state));
|
||||
logv(peer->log, -1, fmt, ap);
|
||||
logv_add(peer->log, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
/* If we haven't reached awaiting locked, we don't need to reconnect */
|
||||
|
||||
Reference in New Issue
Block a user