-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
kind/bugFeature doesn't work as expected.Feature doesn't work as expected.
Description
FileDownloadDelegate calls pool.start() on a NIOThreadPool that is either provided by the user or by AHC itself through
public init(
path: String,
pool: NIOThreadPool = NIOThreadPool(numberOfThreads: 1),
reportHead: ((HTTPResponseHead) -> Void)? = nil,
reportProgress: ((Progress) -> Void)? = nil
)AHC however never calls .shutdownGracefully/.syncShutdownGracefully on that pool. That means the user has to provide a NIOThreadPool, or else we'll just leak it (because AHC never calls stop).
Ie. in the default use case we
- spawn a fresh thread per download
- and then leak the thread
😭
Metadata
Metadata
Assignees
Labels
kind/bugFeature doesn't work as expected.Feature doesn't work as expected.