mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 11:48:09 +08:00
Merge pull request #1183 from rc452860/master
This commit is contained in:
commit
7803d557b3
@ -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