sql: release memory when returning connection to the pool

This commit is contained in:
link2xt
2023-02-17 22:09:24 +00:00
parent bfd3c1763d
commit 90087bde39
2 changed files with 2 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ impl Drop for PooledConnection {
// Put the connection back unless the pool is already dropped.
if let Some(pool) = self.pool.upgrade() {
if let Some(conn) = self.conn.take() {
conn.release_memory().ok();
pool.put(conn);
}
}