You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.
FCM tokens, used to send notification to Phoenix, are supposed to be sent to endurance (using a custom LN message) when the seed is loaded but it does not seems to be reliable.
What we do is:
private suspend fun sendToPeer(msg: LightningMessage) {
valencoded=LightningMessage.encode(msg)
logger.info { "n:$remoteNodeId sending $msg" }
output.send(encoded)
}
// The (node_id, fcm_token) tuple only needs to be registered once.// And after that, only if the tuple changes (e.g. different fcm_token).
fun registerFcmToken(token: String?) {
valmsg=FCMToken(token)
launch { sendToPeer(msg) }
}
=> What happens if the tcp connection has not been established yet when registerFcmToken() is called? Will the outgoing message stay in output to be picked up once we are connected, or will it be lost ? @romainbsl what do you think ?
The text was updated successfully, but these errors were encountered:
I think output won't lose any message, unless its buffer goes beyond 64 elements. I pretty confident that this might not be the case here, but still can be kept in mind for deeper investigation.
However, looking at the Phoenix code, the mistake is mine.
I've refactored the way the Peer is handle, and ended with something like:
FCM tokens, used to send notification to Phoenix, are supposed to be sent to endurance (using a custom LN message) when the seed is loaded but it does not seems to be reliable.
What we do is:
=> What happens if the tcp connection has not been established yet when
registerFcmToken()
is called? Will the outgoing message stay inoutput
to be picked up once we are connected, or will it be lost ? @romainbsl what do you think ?The text was updated successfully, but these errors were encountered: