# 1.8.1

## Improvements

* the session will now eagerly write initial data to connections instead of waiting for I/O the first time (saves a syscall).
* removed all rescue blocks rescuing `StandardError` internally; this could interfere with usages of `httpx` inside `Timeout.timeout` blocks, which may emit an exception at any point, including in blocks where that exception could be rescued, leaving the session in a potentially irrecoverable state and looping.
* debug logs change the display of ids from 'tid:123, fid:123' to 'tid=123 fid:123'.
  * and when using the `datadog` adapter, all related correlation ids (trace id, span id, etc) will also be added to the identifiers in the same format
* plugins built on top of the `:retries` plugin will skip the `retry_after` interval when certain conditions are met.
  * `:persistent` plugin: request will be retried immediately, when the error happens after the keep alive interval expired.
  * `:auth` plugin: request will be retried immediately if it failed due to a "401 Unauthorized Error".
* `:ssrf_filter` plugin: removed public/private references of exception message.

## Bugfixes

* `:auth` plugin: handle edge case where `:auth_header_expires_at` returns no value.
* `:digest_auth` plugin: do not retry if there was an issue building building the authorization header after the probe.
* `webmock` adapter: prevent mocked requests from opening a connection to the peer server that will not be used.
* clear and cancel request timers on completion or reset, ensuring that they won't be retained way past the point where the request is gone.
* connection: cancel and discard ping timer before closing (removes timer reference)
* connection: fix logic where purging-while-resending requests to a coalesced connection was leaving references in the old connection.
* moved an `on_body_chunk` callback to the `:callbacks` plugin, where it's used and expected to be defined.
* `http2`: avoid closing the connection on internal errors which are supposed to be specific to a request, such as the max headers or max response body size checks.
* system resolver will use an internal exception when using `Timeout.timeout` on resolutions to avoid conflicts with the default timeout exception class.
* prevent edge case where `#alpn_protocol` was being called on a `TCPSocket`.
* fixed v1.8.0 regression causing connection to loop when an error happens while connecting.
* resolver cache: fixed cache eviction logic, where alias answers weren't being evicted, causing resolutions to stall after a certain number of resolutions.
