From 89420eacd034f32d972c462c1308cb3a999ae21a Mon Sep 17 00:00:00 2001 From: jianzhiyao Date: Tue, 23 Jun 2020 23:05:58 +0800 Subject: [PATCH] go destroy --- orm/db_alias.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/orm/db_alias.go b/orm/db_alias.go index 36625f0a..5fab1d72 100644 --- a/orm/db_alias.go +++ b/orm/db_alias.go @@ -443,8 +443,10 @@ func (s *stmtDecorator) release() { //garbage recycle for stmt func (s *stmtDecorator) destroy() { - s.wg.Wait() - _ = s.stmt.Close() + go func() { + s.wg.Wait() + _ = s.stmt.Close() + }() } func newStmtDecorator(sqlStmt *sql.Stmt) *stmtDecorator {