mirror of https://github.com/Icinga/icinga2.git
tcpsocket: fix fd on setsockopt SO_REUSEADDR
This commit is contained in:
parent
26cc0ecb02
commit
a5d3b74da6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue