tcpsocket: fix fd on setsockopt SO_REUSEADDR

This commit is contained in:
Michael Friedrich 2013-07-12 11:03:36 +02:00
parent 26cc0ecb02
commit a5d3b74da6
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ void TcpSocket::Bind(const String& node, const String& service, int family)
#ifndef _WIN32
const int optTrue = 1;
setsockopt(GetFD(), SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<const char *>(&optTrue), sizeof(optTrue));
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<const char *>(&optTrue), sizeof(optTrue));
#endif /* _WIN32 */
int rc = bind(fd, info->ai_addr, info->ai_addrlen);