xmppo / go-xmpp

Go XMPP Library (From Yasuhiro Matsumoto and based on the code from Russ Cox)
https://golang.org/
BSD 3-Clause "New" or "Revised" License
530 stars 167 forks source link

connect should use a net.Dialer or net.DialTimeout to guard against indefinitely long blocking #116

Closed froodian closed 3 years ago

froodian commented 5 years ago

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.