mirror of https://github.com/Icinga/icinga2.git
parent
208fd535d4
commit
85afec8952
|
@ -177,8 +177,8 @@ void TcpSocket::Connect(const String& node, const String& service)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int optval = 1;
|
const int optTrue = 1;
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval)) != 0) {
|
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, reinterpret_cast<const char *>(&optTrue), sizeof(optTrue)) != 0) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
error = WSAGetLastError();
|
error = WSAGetLastError();
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
|
|
Loading…
Reference in New Issue