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 {