Skip to content

Commit a6e54bf

Browse files
authored
Avoid hanging on takeHeaders (incorrect 103 handling) when response body is empty. (#7954) (#8054)
(cherry picked from commit 7308264)
1 parent 4190ca8 commit a6e54bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ class Http2Stream internal constructor(
258258
if (this.errorCode != null) {
259259
return false
260260
}
261-
if (source.finished && sink.finished) {
262-
return false
263-
}
264261
this.errorCode = errorCode
265262
this.errorException = errorException
266263
notifyAll()
264+
if (source.finished && sink.finished) {
265+
return false
266+
}
267267
}
268268
connection.removeStream(id)
269269
return true

0 commit comments

Comments
 (0)