Sending queue : reintroduce failed status for unrecoverable error

This commit is contained in:
ganfra 2024-06-19 11:32:04 +02:00
parent 664e584401
commit 0e94771f03
7 changed files with 49 additions and 27 deletions

View file

@ -77,7 +77,13 @@ fun RustEventSendState?.map(): LocalEventSendState? {
return when (this) {
null -> null
RustEventSendState.NotSentYet -> LocalEventSendState.NotSentYet
is RustEventSendState.SendingFailed -> LocalEventSendState.SendingFailed(error)
is RustEventSendState.SendingFailed -> {
if (this.isRecoverable) {
LocalEventSendState.SendingFailed.Recoverable(this.error)
} else {
LocalEventSendState.SendingFailed.Unrecoverable(this.error)
}
}
is RustEventSendState.Sent -> LocalEventSendState.Sent(EventId(eventId))
}
}