aboutsummaryrefslogtreecommitdiff
path: root/prototypes
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-07-23 05:33:50 +0200
committerPřemysl Janouch <p@janouch.name>2018-07-23 05:33:50 +0200
commite8602ee718866c83bf58e5cbe32ab1ab6b916969 (patch)
tree6fb38244a72ec89af08daa5a4aab972960c80081 /prototypes
parenta8f02e0d3734bf3f2ba2f157630e05923175173b (diff)
downloadhaven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.tar.gz
haven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.tar.xz
haven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.zip
tls-autodetect: avoid a goroutine leak on timeout
Diffstat (limited to 'prototypes')
-rw-r--r--prototypes/tls-autodetect.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prototypes/tls-autodetect.go b/prototypes/tls-autodetect.go
index 3ff4128..4ce665b 100644
--- a/prototypes/tls-autodetect.go
+++ b/prototypes/tls-autodetect.go
@@ -322,7 +322,7 @@ func prepare(client *client) {
// The Cgo resolver doesn't pthread_cancel getnameinfo threads, so not
// bothering with pointless contexts.
- ch := make(chan string)
+ ch := make(chan string, 1)
go func() {
defer close(ch)
if names, err := net.LookupAddr(host); err != nil {