mirror of
https://gitee.com/johng/gf.git
synced 2024-12-03 04:37:49 +08:00
去除cancelFunc避免退出之前关闭mysqlConn导致数据获取不完整
This commit is contained in:
parent
a69aec9070
commit
0e6cddb547
@ -111,9 +111,7 @@ func (c *Core) DoQuery(link Link, sql string, args ...interface{}) (rows *sql.Ro
|
||||
sql, args = c.db.HandleSqlBeforeCommit(link, sql, args)
|
||||
ctx := c.db.GetCtx()
|
||||
if c.GetConfig().QueryTimeout > 0 {
|
||||
var cancelFunc context.CancelFunc
|
||||
ctx, cancelFunc = context.WithTimeout(ctx, c.GetConfig().QueryTimeout)
|
||||
defer cancelFunc()
|
||||
ctx, _ = context.WithTimeout(ctx, c.GetConfig().QueryTimeout)
|
||||
}
|
||||
|
||||
mTime1 := gtime.TimestampMilli()
|
||||
|
Loading…
Reference in New Issue
Block a user