You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net/dnscache
David Anderson e510abc8d0 net/dnscache: don't cancel the TLS context before writing to the result channel.
Cancelling the context makes the timeout goroutine race with the write that
reports a successful TLS handshake, so you can end up with a successful TLS
handshake that mysteriously reports that it timed out after ~0s in flight.

The context is always canceled and cleaned up as the function exits, which
happens mere microseconds later, so just let function exit clean up and
thereby avoid races.

Signed-off-by: David Anderson <danderson@tailscale.com>
(cherry picked from commit a9da6b73a8)
4 years ago
..
dnscache.go net/dnscache: don't cancel the TLS context before writing to the result channel. 4 years ago
dnscache_test.go net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code 5 years ago
messagecache.go net/dnscache, net/tsdial: add DNS caching to tsdial UserDial 4 years ago
messagecache_test.go net/dnscache, net/tsdial: add DNS caching to tsdial UserDial 4 years ago