Let’s say I have a simple tls dial happening:
conn, err := tls.Dial(“tcp”, 192.168.1.10)
After this dial, I have a for loop printing “connected”:
fmt.Println(“Connected”)
How can I make sure the initial tls.Dial is still active? Is there a way to specify a timeout threshold? I’d like to have an if statement, something like:
if conn fails; tls.Close