mirror of
https://github.com/znc/znc.git
synced 2026-05-02 03:22:33 +02:00
Always use blocking DNS for resolving bind hosts
This fixes a bug where ZNC failed to bind to domain names if they weren't mentioned in /etc/hosts. Thanks to alturiak for finding and reporting this. Thanks to Imaginos for finding a quick workaround. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1673 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -857,7 +857,9 @@ bool Csock::Listen( u_short iPort, int iMaxConns, const CS_STRING & sBindHost, u
|
||||
m_sBindHost = sBindHost;
|
||||
if ( !sBindHost.empty() )
|
||||
{
|
||||
if( GetAddrInfo( sBindHost, m_address ) != 0 )
|
||||
// forcing this to block regardless of resolver overloading, because listen is not currently setup to
|
||||
// to handle nonblocking operations. This is used to resolve local ip's for binding anyways and should be instant
|
||||
if( ::GetAddrInfo( sBindHost, this, m_address ) != 0 )
|
||||
return( false );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user