1
0
mirror of https://github.com/golang/go synced 2024-10-04 23:21:20 -06:00
go/src
Paul Marks dcc905ecf9 net: compute the Dialer deadline exactly once.
When dialing with a relative Timeout instead of an absolute Deadline,
the deadline function only makes sense if called before doing any
time-consuming work.

This change calls deadline exactly once, storing the result until the
Dial operation completes.  The partialDeadline implementation is
reverted to the following patch set 3:
https://go-review.googlesource.com/#/c/8768/3..4/src/net/dial.go

Otherwise, when dialing a name with multiple IP addresses, or when DNS
is slow, the recomputed deadline causes the total Timeout to exceed that
requested by the user.

Fixes #11796

Change-Id: I5e1f0d545f9e86a4e0e2ac31a9bd108849cf0fdf
Reviewed-on: https://go-review.googlesource.com/12442
Run-TryBot: Paul Marks <pmarks@google.com>
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-23 01:19:12 +00:00
..
archive all: link to https instead of http 2015-07-11 14:36:33 +00:00
bufio bufio: Remove unneeded error initialization 2015-07-18 18:05:23 +00:00
builtin builtin: remove errant space in hyphenated adjective phrase 2015-06-28 21:41:38 +00:00
bytes bytes, strings: add LastIndexByte 2015-04-30 07:13:18 +00:00
cmd cmd/go: for get -t and list, look up path in vendor directories 2015-07-22 21:16:53 +00:00
compress all: link to https instead of http 2015-07-11 14:36:33 +00:00
container
crypto crypto/elliptic: call IsOnCurve via the interface. 2015-07-22 17:37:36 +00:00
database/sql database/sql: document closing requirements for Stmts 2015-07-15 04:31:41 +00:00
debug debug/pe: truncate pe sections to their size in memory 2015-07-10 03:33:38 +00:00
encoding encoding/json: fix decoding of JSON null values 2015-07-22 15:39:54 +00:00
errors
expvar
flag flag: add comment stating that Set is called in sequence across the command line 2015-07-16 05:33:47 +00:00
fmt fmt: restore padding for %x on byte slices and strings 2015-06-29 07:17:23 +00:00
go runtime/trace: add new package 2015-07-22 15:47:16 +00:00
hash hash/crc32: speedup crc32 of IEEE using slicingBy8 2015-06-18 18:14:24 +00:00
html all: link to https instead of http 2015-07-11 14:36:33 +00:00
image image/color: fix format typo in the tests. 2015-07-16 01:41:34 +00:00
index/suffixarray
internal internal/trace: fix fuzzer crashers 2015-07-18 19:51:50 +00:00
io io: tweak Reader comment 2015-06-29 21:17:47 +00:00
log log: fix flaky test 2015-06-18 18:08:17 +00:00
math math/big: document rounding for Rat.FloatToString 2015-07-22 19:47:19 +00:00
mime all: link to https instead of http 2015-07-11 14:36:33 +00:00
net net: compute the Dialer deadline exactly once. 2015-07-23 01:19:12 +00:00
os os/exec: close read pipe if copy to io.Writer fails 2015-07-22 21:37:18 +00:00
path all: link to https instead of http 2015-07-11 14:36:33 +00:00
reflect cmd/compile: fix PtrTo(t) for unnamed t with embedded fields 2015-07-15 05:36:27 +00:00
regexp regexp: small correction to test comment 2015-06-14 17:09:13 +00:00
runtime runtime: handle linux CPU masks up to 64k CPUs 2015-07-22 20:53:01 +00:00
sort
strconv strconv: add examples to package 2015-07-22 16:00:21 +00:00
strings all: link to https for golang subdomains too 2015-07-12 04:42:40 +00:00
sync sync: disable flaky WaitGroup misuse test in short mode 2015-06-29 18:44:52 +00:00
syscall syscall: warn not to use FormatMessage 2015-07-21 02:26:27 +00:00
testing runtime/trace: add new package 2015-07-22 15:47:16 +00:00
text text/template: make zero Template work again 2015-06-24 22:27:33 +00:00
time time: make it clearer how to format a fractional second 2015-07-15 05:13:05 +00:00
unicode unicode: upgrade to 8.0.0 2015-06-26 18:01:29 +00:00
unsafe
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: robust cleanup in case of failure. 2015-07-17 21:12:12 +00:00
bootstrap.bash
buildall.bash buildall.bash: exit 1 when make.bash fails 2015-05-17 01:40:33 +00:00
clean.bash build: fix clean scripts 2015-06-18 16:13:13 +00:00
clean.bat build: fix clean scripts 2015-06-18 16:13:13 +00:00
clean.rc build: fix clean scripts 2015-06-18 16:13:13 +00:00
iostest.bash
make.bash doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
make.bat doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
Make.dist
make.rc doc: replace references to {5..9}{g,l} with go tool compile and go tool link 2015-06-17 04:05:50 +00:00
nacltest.bash nacltest.bash: remove syscall/fstest_nacl.go after test 2015-05-02 02:48:32 +00:00
race.bash all: link to https instead of http 2015-07-11 14:36:33 +00:00
race.bat all: link to https instead of http 2015-07-11 14:36:33 +00:00
run.bash build: correct quoting of args in run.bash 2015-05-09 04:23:47 +00:00
run.bat
run.rc