Use clone for retrofit request to be able to retry
This commit is contained in:
parent
e5e62dc4a7
commit
15b0bea870
@ -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…
x
Reference in New Issue
Block a user