mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Abort re-reg with pin flow if unable to communicate via svr websocket.
This commit is contained in:
committed by
jeffrey-signal
parent
9db33c3fec
commit
26b8de2282
@@ -96,6 +96,7 @@ import org.whispersystems.signalservice.internal.push.AuthCredentials
|
||||
import org.whispersystems.signalservice.internal.push.ProvisionMessage
|
||||
import org.whispersystems.signalservice.internal.push.SyncMessage
|
||||
import java.io.IOException
|
||||
import java.net.ProtocolException
|
||||
import java.nio.charset.StandardCharsets
|
||||
import kotlin.jvm.optionals.getOrNull
|
||||
import kotlin.math.max
|
||||
@@ -692,6 +693,14 @@ class RegistrationViewModel : ViewModel() {
|
||||
Log.w(TAG, "SVR has no data for these credentials. Aborting skip SMS flow.", noData)
|
||||
updateSvrTriesRemaining(0)
|
||||
setUserSkippedReRegisterFlow(true)
|
||||
} catch (ioe: IOException) {
|
||||
if (ioe.cause is ProtocolException) {
|
||||
Log.w(TAG, "Network error attempting to communicate with SVR, likely web socket http protocol exception. Skipping re-reg", ioe)
|
||||
setUserSkippedReRegisterFlow(true)
|
||||
} else {
|
||||
Log.w(TAG, "Network error attempting to communicate with SVR.", ioe)
|
||||
handleGenericError(ioe)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user