mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
fixup! Close memory leak, make error exposure DEVELOPER=1 only.
This commit is contained in:
parent
9842e32e06
commit
369d3ab46e
@ -305,7 +305,14 @@ void channel_internal_error(struct channel *channel, const char *fmt, ...)
|
|||||||
|
|
||||||
log_broken(channel->log, "Peer internal error %s: %s",
|
log_broken(channel->log, "Peer internal error %s: %s",
|
||||||
channel_state_name(channel), why);
|
channel_state_name(channel), why);
|
||||||
|
|
||||||
|
/* Don't expose internal error causes to remove unless doing dev */
|
||||||
|
#if DEVELOPER
|
||||||
channel_fail_permanent(channel, "Internal error: %s", why);
|
channel_fail_permanent(channel, "Internal error: %s", why);
|
||||||
|
#else
|
||||||
|
channel_fail_permanent(channel, "Internal error");
|
||||||
|
#endif
|
||||||
|
tal_free(why);
|
||||||
}
|
}
|
||||||
|
|
||||||
void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user