From 81d72fc35d321eb7ecc9fcf74db59e028a92e5e8 Mon Sep 17 00:00:00 2001 From: hzliangbin Date: Mon, 20 Jun 2022 14:28:32 +0800 Subject: [PATCH] fix: put conn back --- pkg/sql/db.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/sql/db.go b/pkg/sql/db.go index a50c5340..22f2a2a0 100644 --- a/pkg/sql/db.go +++ b/pkg/sql/db.go @@ -365,6 +365,7 @@ func (db *DB) TestConn() error { if err != nil { return err } + defer db.pool.Put(r) conn := r.(*driver.BackendConnection) return conn.Ping(context.Background()) }