-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
Thank you for creating such a useful crate.
I encountered an issue when I set the pool size constraints to PoolConstraints::new(0, 0), which results in an infinite wait for a connection. You can reproduce the problem with the following code:
let pool_constraints = PoolConstraints::new(0, 0).unwrap();
let pool = Pool::new(get_opts().pool_opts(PoolOpts::default().with_constraints(pool_constraints))).unwrap();
let conn = pool.get_conn();Of course, I did not intentionally set the pool size to 0. The values for min and max are defined in a JSON configuration file that users can modify. If there is a typo in the property name or an incorrect value is provided, this issue could easily occur. In such cases, I believe additional validation is necessary.
I would like to write and submit a PR to address this. Please review. Thank you.
Metadata
Metadata
Assignees
Labels
No labels