mirror of
https://github.com/Icinga/icinga2.git
synced 2025-05-04 22:50:20 +02:00
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
|
#ifndef _WIN32
|
||||||
const int optTrue = 1;
|
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 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
int rc = bind(fd, info->ai_addr, info->ai_addrlen);
|
int rc = bind(fd, info->ai_addr, info->ai_addrlen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user