Replies: 1 comment 1 reply
-
You created a separate HTTPClient that isn't managed by the AWSClient you have to shut that down as well. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Soto v7.0.0:
I have code like this:
Note that it calls
s3.client.shutdown()
whether or not it encounters an error.But at the very end of the function, I get "AsyncHTTPClient/HTTPClient.swift:166: Fatal error: Client not shut down before the deinit. Please call client.shutdown() when no longer needed. Otherwise memory will leak."
The S3 service is created like this:
Am I missing something?
Update: As I look through the code, I see it is
AsyncHTTPClient/HTTPClient
that is asserting it is not shut down, notAWSClient
. DoesAWSClient.shutdown()
need to callself.httpClient.shutdown()
? Or do I have to shut down both clients myself?The more I look at it, the more of a mess it seems, as by default,
AWSClient
usesHTTPClient.shared
, which probably shouldn't be shut down more than once. But in my app, there can be more than one S3 service in use, and they might need different HTTPClient configurations (the only reason I can’t use the shared one right now is because Digital Ocean Spaces seems to trip on some HTTP/2 requests).Beta Was this translation helpful? Give feedback.
All reactions