Skip to content

Commit

Permalink
Avoid hanging on takeHeaders (incorrect 103 handling) when response b…
Browse files Browse the repository at this point in the history
…ody is empty. (square#7954)

(cherry picked from commit 7308264)
  • Loading branch information
yschimke committed Oct 15, 2023
1 parent 6d4946d commit 5c99d8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ class Http2Stream internal constructor(
if (this.errorCode != null) {
return false
}
if (source.finished && sink.finished) {
return false
}
this.errorCode = errorCode
this.errorException = errorException
notifyAll()
if (source.finished && sink.finished) {
return false
}
}
connection.removeStream(id)
return true
Expand Down

0 comments on commit 5c99d8b

Please sign in to comment.