Prevent okhttp from auto-retrying attachment uploads.
This commit is contained in:
parent
494b2c6786
commit
9337201ffb
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package org.whispersystems.signalservice.internal.push.http
|
||||||
|
|
||||||
import okhttp3.MediaType
|
import okhttp3.MediaType
|
||||||
import okhttp3.RequestBody
|
import okhttp3.RequestBody
|
||||||
|
import okhttp3.internal.http.UnrepeatableRequestBody
|
||||||
import okio.BufferedSink
|
import okio.BufferedSink
|
||||||
import org.signal.libsignal.protocol.logging.Log
|
import org.signal.libsignal.protocol.logging.Log
|
||||||
import org.whispersystems.signalservice.api.crypto.DigestingOutputStream
|
import org.whispersystems.signalservice.api.crypto.DigestingOutputStream
|
||||||
|
@ -23,7 +24,7 @@ class DigestingRequestBody(
|
||||||
private val progressListener: SignalServiceAttachment.ProgressListener?,
|
private val progressListener: SignalServiceAttachment.ProgressListener?,
|
||||||
private val cancelationSignal: CancelationSignal?,
|
private val cancelationSignal: CancelationSignal?,
|
||||||
private val contentStart: Long
|
private val contentStart: Long
|
||||||
) : RequestBody() {
|
) : RequestBody(), UnrepeatableRequestBody {
|
||||||
lateinit var transmittedDigest: ByteArray
|
lateinit var transmittedDigest: ByteArray
|
||||||
private set
|
private set
|
||||||
var incrementalDigest: ByteArray? = null
|
var incrementalDigest: ByteArray? = null
|
||||||
|
|
Loading…
Add table
Reference in a new issue