Prevent okhttp from auto-retrying attachment uploads.

This commit is contained in:
Cody Henthorne 2023-09-01 13:44:10 -04:00 committed by Nicholas Tinsley
parent 494b2c6786
commit 9337201ffb

View file

@ -2,6 +2,7 @@ package org.whispersystems.signalservice.internal.push.http
import okhttp3.MediaType
import okhttp3.RequestBody
import okhttp3.internal.http.UnrepeatableRequestBody
import okio.BufferedSink
import org.signal.libsignal.protocol.logging.Log
import org.whispersystems.signalservice.api.crypto.DigestingOutputStream
@ -23,7 +24,7 @@ class DigestingRequestBody(
private val progressListener: SignalServiceAttachment.ProgressListener?,
private val cancelationSignal: CancelationSignal?,
private val contentStart: Long
) : RequestBody() {
) : RequestBody(), UnrepeatableRequestBody {
lateinit var transmittedDigest: ByteArray
private set
var incrementalDigest: ByteArray? = null