-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
The following assert fails in a test program with 0.32. Works fine with 0.31.
mysql_async/src/conn/pool/recycler.rs
Lines 228 to 229 in bbf24b0
// we're about to exit, so there better be no outstanding connections | |
assert_eq!(exchange.exist, 0); |
#[tokio::main]
async fn main() -> mysql_async::Result<()> {
let pool = mysql_async::Pool::new("mysql://root:[email protected]:3307/mysql");
tokio::spawn({
let pool = pool.clone();
async move {
let mut _conn = pool.get_conn().await.unwrap();
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
}
});
pool.disconnect().await?;
Ok(())
}
mysql_async/src/conn/pool/mod.rs
Lines 244 to 248 in bbf24b0
/// Async function that disconnects this pool from the server and resolves to `()`. | |
/// | |
/// **Note:** This Future won't resolve until all active connections, taken from it, | |
/// are dropped or disonnected. Also all pending and new `GetConn`'s will resolve to error. | |
pub fn disconnect(self) -> DisconnectPool { |
Metadata
Metadata
Assignees
Labels
No labels