Fixed logic in socketthreads connecting
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1255 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
37c1f8b16f
commit
ea750b9745
@ -433,13 +433,13 @@ bool cSocketThreads::cSocketThread::Start(void)
|
|||||||
LOGERROR("Cannot create a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
LOGERROR("Cannot create a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (m_ControlSocket2.BindToLocalhostIPv4(cSocket::ANY_PORT) != 0)
|
if (!m_ControlSocket2.BindToLocalhostIPv4(cSocket::ANY_PORT))
|
||||||
{
|
{
|
||||||
LOGERROR("Cannot bind a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
LOGERROR("Cannot bind a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
||||||
m_ControlSocket2.CloseSocket();
|
m_ControlSocket2.CloseSocket();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (m_ControlSocket2.Listen(1) != 0)
|
if (!m_ControlSocket2.Listen(1))
|
||||||
{
|
{
|
||||||
LOGERROR("Cannot listen on a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
LOGERROR("Cannot listen on a Control socket for a cSocketThread (\"%s\"); continuing, but server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
|
||||||
m_ControlSocket2.CloseSocket();
|
m_ControlSocket2.CloseSocket();
|
||||||
|
Loading…
Reference in New Issue
Block a user