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)
  • Loading branch information
yschimke authored Oct 2, 2023
1 parent 6142669 commit 7308264
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,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 Expand Up @@ -491,7 +491,7 @@ class Http2Stream internal constructor(
// But delay updating the stream flow control until that stream has been
// consumed
updateConnectionFlowControl(byteCount)

// Notify that buffer size changed
connection.flowControlListener.receivingStreamWindowChanged(id, readBytes, readBuffer.size)
}
Expand Down

0 comments on commit 7308264

Please sign in to comment.