Skip to content

Commit

Permalink
Mark duplex streaming bodies as one shot (#155)
Browse files Browse the repository at this point in the history
Update PipeDuplexRequestBody to indicate that request bodies are one
shot (they can't be re-read).
  • Loading branch information
pkwarren committed Dec 6, 2023
1 parent dff2aa7 commit de27a21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions okhttp/src/main/kotlin/com/connectrpc/okhttp/OkHttpStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ internal class PipeDuplexRequestBody(

override fun isDuplex() = true

override fun isOneShot() = true

fun close() {
try {
bufferedSink.close()
Expand Down

0 comments on commit de27a21

Please sign in to comment.