Skip to content

Commit

Permalink
Relocate stream.close() to onResponseComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Aug 1, 2024
1 parent 141bf7c commit a60d503
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ internal class SdkStreamResponseHandler(
// stream is only valid until the end of this callback, ensure any further data being read downstream
// doesn't call incrementWindow on a resource that has been free'd
lock.withLock {
crtStream?.close() ?: throw IllegalStateException("onResponseComplete expected CRT HttpStream to be non-null")
crtStream?.close()
crtStream = null
streamCompleted = true
}
Expand Down

0 comments on commit a60d503

Please sign in to comment.