DelayedStream.setStream() should cancel the provided stream if not using it
Open
code health
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
If `cancel()` or `setStream()` was previously called then `setStream()` throws away the stream argument. It should `cancel()` the stream to make sure resources are freed, although I think only DelayedClientTransport benefits.
This should not be done until after #1536. I don't know if OkHttp suffers a similar problem. If so, we may want to revisit whether it makes sense to allow streams to be cancelled before `start()`.
Contributor guide
Assessment
This issue has not been assessed yet.