mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-09 16:10:00 +08:00
fix: fix ignored context.DeadlineExceeded (#4066)
This commit is contained in:
@@ -296,7 +296,7 @@ func (db *commonSqlConn) queryRows(ctx context.Context, scanner func(*sql.Rows)
|
||||
|
||||
return query(ctx, conn, func(rows *sql.Rows) error {
|
||||
e := scanner(rows)
|
||||
if e != nil && !errors.Is(e, context.DeadlineExceeded) {
|
||||
if isScanFailed(e) {
|
||||
scanFailed = true
|
||||
}
|
||||
return e
|
||||
|
||||
Reference in New Issue
Block a user