Files
znc/Csocket.cpp
psychon 4c14b1bf61 Fix a DNS bug in Csocket with non-blocking resolvers
After the first attempt to lookup an address, Csocket already created the socket
used for communicating. Since at this point it wasn't yet known whether we will
yield a IPv4 or IPv6 address, Csocket just always used IPv4. This would then
later fail to connect() with 'Address family not supported by protocol'.

This patch fixes this by creating the socket fd only when the DNS lookup
completed successfully.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1556 726aef4b-f618-498e-8847-2d620e286838
2009-07-04 12:54:15 +00:00

52 KiB