tls-autodetect: avoid a goroutine leak on timeout
This commit is contained in:
parent
a8f02e0d37
commit
e8602ee718
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user