You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix HTTPClient crash when download fails before shutdown (#837)
Currently, when `FileDownloader.downloadFile()` encounters an error
during `client.execute()` (e.g., XPC connection interruption or network
timeout), the `HTTPClient` instance is deallocated without calling
`shutdown()`, resulting in a crash:
`AsyncHTTPClient/HTTPClient.swift:187: Fatal error: Client not shut down
before the deinit.`
This caused to a control flow issue when attempting to download the
default kernel during `container system start` and, under certain
conditions (e.g., network latency), encountering the timeout error
`HTTPClientError.connectTimeout`.
To address this, `client.execute()` is now wrapped in a do/catch to
ensure `shutdown()` is always called on both success and error paths.
Also I've added an explicit timeout configuration (30s connect, no read
timeout) to better accommodate large file downloads.
0 commit comments