diff options
| author | Přemysl Janouch <p@janouch.name> | 2018-07-23 05:33:50 +0200 | 
|---|---|---|
| committer | Přemysl Janouch <p@janouch.name> | 2018-07-23 05:33:50 +0200 | 
| commit | e8602ee718866c83bf58e5cbe32ab1ab6b916969 (patch) | |
| tree | 6fb38244a72ec89af08daa5a4aab972960c80081 | |
| parent | a8f02e0d3734bf3f2ba2f157630e05923175173b (diff) | |
| download | haven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.tar.gz haven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.tar.xz haven-e8602ee718866c83bf58e5cbe32ab1ab6b916969.zip | |
tls-autodetect: avoid a goroutine leak on timeout
| -rw-r--r-- | prototypes/tls-autodetect.go | 2 | 
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 { | 
