lnlink

iOS app for connecting to lightning nodes
git clone git://jb55.com/lnlink
Log | Files | Refs | Submodules | README | LICENSE

commit 57fb6dcb49c9bd9c4d2695fd762fc2abb5b077fe
parent 45e2d55f14a2f015f3cc9a6b93589c6da3f08d50
Author: Fonta1n3 <fontainedenton@googlemail.com>
Date:   Mon,  9 Oct 2023 22:42:34 -0500

fix: this prevents the crash if the node is off

Closes: https://github.com/jb55/lnlink/pull/13
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mlightninglink/lightninglinkApp.swift | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/lightninglink/lightninglinkApp.swift b/lightninglink/lightninglinkApp.swift @@ -39,6 +39,9 @@ func fetch_dashboard(lnlink: LNLink) -> Either<String, Dashboard> { @main struct lightninglinkApp: App { + init() { + preventCrash() + } var body: some Scene { WindowGroup { SetupView() @@ -90,3 +93,9 @@ func load_lnlink() -> LNLink? { return LNLink(token: token, host: host, node_id: node_id) } + +private extension lightninglinkApp { + func preventCrash() { + signal(SIGPIPE, SIG_IGN) + } +}