1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 16:00:59 +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 //garbage recycle for stmt
func (s *stmtDecorator) destroy() { func (s *stmtDecorator) destroy() {
go func() {
s.wg.Wait() s.wg.Wait()
_ = s.stmt.Close() _ = s.stmt.Close()
}()
} }
func newStmtDecorator(sqlStmt *sql.Stmt) *stmtDecorator { func newStmtDecorator(sqlStmt *sql.Stmt) *stmtDecorator {