Creating a new client calls net.Dial - this call can block indefinitely depending on the server, so for production systems it is safer to use DialTimeout (and make the timeout value configurable) or even better, take a net.Dialer as configuration and use the Dial function on that.
Creating a new client calls
net.Dial
- this call can block indefinitely depending on the server, so for production systems it is safer to useDialTimeout
(and make the timeout value configurable) or even better, take anet.Dialer
as configuration and use theDial
function on that.