Skip to content

Commit

Permalink
fix: fail re-try if verifying epoch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
typfel committed Sep 22, 2023
1 parent dd22d3c commit 31307a4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,12 @@ internal class MessageSenderImpl internal constructor(
if (it is NetworkFailure.ServerMiscommunication && it.kaliumException is KaliumException.InvalidRequestError) {
if (it.kaliumException.isMlsStaleMessage()) {
logger.w("Encrypted MLS message for stale epoch '${message.id}', re-trying..")
staleEpochVerifier.verifyEpoch(message.conversationId)
return syncManager.waitUntilLiveOrFailure().flatMap {
attemptToSend(message)
}
return staleEpochVerifier.verifyEpoch(message.conversationId)
.flatMap {
syncManager.waitUntilLiveOrFailure().flatMap {
attemptToSend(message)
}
}
}
}
Either.Left(it)
Expand Down

0 comments on commit 31307a4

Please sign in to comment.