Added error messages to socket closing error conditions for *nix
git-svn-id: http://mc-server.googlecode.com/svn/trunk@456 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
23cfcc6ffd
commit
2b0dd758d5
@ -75,11 +75,11 @@ void cSocket::CloseSocket()
|
|||||||
|
|
||||||
if (shutdown(m_Socket, SHUT_RDWR) != 0)//SD_BOTH);
|
if (shutdown(m_Socket, SHUT_RDWR) != 0)//SD_BOTH);
|
||||||
{
|
{
|
||||||
LOGWARN("Error on shutting down socket (%s)", m_IPString.c_str());
|
LOGWARN("Error on shutting down socket (%s): %s", m_IPString.c_str(), GetLastErrorString().c_str());
|
||||||
}
|
}
|
||||||
if (close(m_Socket) != 0)
|
if (close(m_Socket) != 0)
|
||||||
{
|
{
|
||||||
LOGWARN("Error closing socket (%s)", m_IPString.c_str());
|
LOGWARN("Error closing socket (%s): %s", m_IPString.c_str(), GetLastErrorString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // else _WIN32
|
#endif // else _WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user