mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Use clone for retrofit request to be able to retry
This commit is contained in:
parent
e5e62dc4a7
commit
15b0bea870
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ internal class Request<DATA>(private val eventBus: EventBus?) {
|
|||
|
||||
suspend fun execute(): DATA {
|
||||
return try {
|
||||
val response = apiCall.awaitResponse()
|
||||
val response = apiCall.clone().awaitResponse()
|
||||
if (response.isSuccessful) {
|
||||
response.body()
|
||||
?: throw IllegalStateException("The request returned a null body")
|
||||
|
|
Loading…
Reference in a new issue