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