aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorTroels Thomsen <troels@thomsen.io>2017-11-14 23:22:19 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2017-11-15 22:34:55 +0000
commit6a3d4be3b80054b1d802b73d5a519e252e0f82ed (patch)
treef3915379b4036160f23f92c15cc1da5fd4b127fa /src/database/sql
parent3a181dc7bc8fd0c61d6090a85f87c934f1874802 (diff)
downloadgo-6a3d4be3b80054b1d802b73d5a519e252e0f82ed.tar.xz
net: Forget lookups for canceled contexts
A sequential lookup using any non-canceled context has a risk of returning the result of the previous lookup for a canceled context (i.e. an error). This is already prevented for timed out context by forgetting the host immediately and extending this to also compare the error to `context.Canceled` resolves this issue. Fixes #22724 Change-Id: I7aafa1459a0de4dc5c4332988fbea23cbf4dba07 Reviewed-on: https://go-review.googlesource.com/77670 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions