mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-04 19:17:30 +01:00
Fixed not closed connection in CachedDataSource
This commit is contained in:
parent
926081f84c
commit
faf07f2887
@ -27,7 +27,7 @@ import timber.log.Timber
|
||||
@androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class)
|
||||
class CachedDataSource(
|
||||
private var upstreamDataSource: DataSource
|
||||
) : BaseDataSource(false) {
|
||||
) : BaseDataSource(true) {
|
||||
|
||||
class Factory(
|
||||
private var upstreamDataSourceFactory: DataSource.Factory
|
||||
@ -186,6 +186,8 @@ class CachedDataSource(
|
||||
transferEnded()
|
||||
responseByteStream?.close()
|
||||
responseByteStream = null
|
||||
} else {
|
||||
upstreamDataSource.close()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user