Replies: 4 comments 2 replies
|
You can add a That e.g. if you wanted to discard objects which weren't recycled within the last minute or so you can do it like that: .pre_recycle(Hook::sync_fn(|_, metrics| {
if metrics.last_used() > Duration::from_secs(60) {
Err(HookError::Continue(None))
} else {
Ok(())
}
})) |
0 replies
|
Sorry. I got that wrong. You want it the other way around. Rather than fast discarding possibly broken objects you don't want to run the recycle method at all for objects which have just been returned to the pool. |
0 replies
|
Maybe |
2 replies
|
This is a requirement for #167 and will be tracked as part of this issue: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
At the moment Deadpool recycles a connection every time it gets an existing one from the pool.
This introduces additional latency.
I wonder if recycling can be smarter and only check connections which were idle for a some time?
All reactions