Commit b9dca1b1 authored by Russ Cox's avatar Russ Cox

database/sql: fix ctx.Done() == nil check

ctx.Done() == ctx.Background().Done() is just
a long way to write ctx.Done() == nil.
Use the short way.

Change-Id: I7b3198b5dc46b8b40086243aa61882bc8c268eac
Reviewed-on: https://go-review.googlesource.com/78128
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 442d15ab
......@@ -120,7 +120,7 @@ func ctxDriverBegin(ctx context.Context, opts *TxOptions, ci driver.Conn) (drive
}
}
if ctx.Done() == context.Background().Done() {
if ctx.Done() == nil {
return ci.Begin()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment