feat(client): Client will retry requests on fresh connections
If a request sees an error on a pooled connection before ever writing any bytes, it will now retry with a new connection. This can be configured with `Config::retry_canceled_requests(bool)`.
This commit is contained in:
@@ -211,6 +211,12 @@ pub struct Pooled<T> {
|
||||
pool: Weak<RefCell<PoolInner<T>>>,
|
||||
}
|
||||
|
||||
impl<T> Pooled<T> {
|
||||
pub fn is_reused(&self) -> bool {
|
||||
self.entry.is_reused
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for Pooled<T> {
|
||||
type Target = T;
|
||||
fn deref(&self) -> &T {
|
||||
|
||||
Reference in New Issue
Block a user