class

Awscr::S3::DefaultHttpClientFactory

Inherits Awscr::S3::HttpClientFactory < Reference < Object

The default implementation of HttpClientFactory used to provide HTTP clients for communicating with S3. This factory creates a new HTTP::Client instance for each request and closes it after use.

Instance methods

acquire_raw_client(endpoint : URI) : HTTP::Client

Acquires a new HTTP::Client instance configured for the given endpoint and signer.

Source
release(client : HTTP::Client | Nil)

Closes the HTTP client to release the underlying TCP connection.

Without this, each S3 request leaks a keep-alive TCP connection. In long-running processes, these accumulate as CLOSE_WAIT sockets when the server closes its end, eventually exhausting memory.

Source