mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
Improve 404 handling
This commit is contained in:
parent
1976451c81
commit
eb30ef166a
1 changed files with 4 additions and 1 deletions
|
@ -75,7 +75,9 @@ class SimpleHttpRendezvousTransport(override var onCancelled: ((reason: Rendezvo
|
|||
val response = httpClient.newCall(request.build()).execute()
|
||||
|
||||
if (response.code == 404) {
|
||||
// we set to unknown and the cancel method will rewrite the reason to expired if applicable
|
||||
cancel(RendezvousFailureReason.Unknown)
|
||||
return
|
||||
}
|
||||
etag = response.header("etag")
|
||||
|
||||
|
@ -116,7 +118,8 @@ class SimpleHttpRendezvousTransport(override var onCancelled: ((reason: Rendezvo
|
|||
try {
|
||||
// expired
|
||||
if (response.code == 404) {
|
||||
cancel(RendezvousFailureReason.Expired)
|
||||
// we set to unknown and the cancel method will rewrite the reason to expired if applicable
|
||||
cancel(RendezvousFailureReason.Unknown)
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue