Closed guggero closed 2 years ago
another thing we can also report back is "session already in use" meaning that the user probably has another tab open that they have forgotten about.
as for expiry, this is slightly tricker and I think needs to be handled in the layer above lnc (ie, in TW). Cause there we can get the macaroon on first connection and glean the expiry there using the OnAuthData
call back
A follow-up issue after implementing https://github.com/lightninglabs/lightning-terminal/pull/300.
Currently there is no way for the client to distinguish between LiT not being online vs. a session having expired. The client just tries to re-connect infinitely, even if a "mailbox does not exist" error is returned.
Perhaps we should start looking at the exact errors returned by the mailbox proxy and add a counter for some of them and abort after a certain number of retries. Then we could present the user with an error message, something like "server did not create mailbox; session not started or expired".