Trying to fix getpeername.

This commit is contained in:
lotodore
2009-04-10 22:09:57 +00:00
parent fb7416a276
commit 1d255e8fca
+1 -1
View File
@@ -189,7 +189,7 @@ ServerAcceptThread::AcceptLoop()
}
// Retrieve peer address.
socklen_t addrLen = (socklen_t)tmpData->GetPeerAddrSize();
socklen_t addrLen = (socklen_t)context.GetServerSockaddrSize();
if (getpeername(tmpData->GetSocket(), tmpData->GetPeerAddr(), &addrLen) != 0)
{
// Something went wrong with the connection, just continue (socket will be closed).