1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-03 10:53:35 +00:00

go destroy

This commit is contained in:
jianzhiyao 2020-06-23 23:05:58 +08:00
parent 6d9862b924
commit 89420eacd0

View File

@ -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 {