go destroy

This commit is contained in:
jianzhiyao 2020-06-23 23:05:58 +08:00
parent 6d9862b924
commit 89420eacd0
1 changed files with 4 additions and 2 deletions

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 {