fix: close all stmt
This commit is contained in:
parent
638805ed62
commit
6ae2f6b00a
@ -45,7 +45,12 @@ func (db *PreparedStmtDB) Close() {
|
||||
}
|
||||
|
||||
func (db *PreparedStmtDB) Reset() {
|
||||
db.Close()
|
||||
db.Mux.Lock()
|
||||
defer db.Mux.Unlock()
|
||||
for _, stmt := range db.Stmts {
|
||||
go stmt.Close()
|
||||
}
|
||||
|
||||
db.PreparedSQL = make([]string, 0, 100)
|
||||
db.Stmts = map[string](*Stmt){}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user