mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
sql: release memory when returning connection to the pool
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user