|
|
@ -197,7 +197,9 @@ static int bridge__set_tcp_keepalive(struct mosquitto *context)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
ret =
|
|
|
|
ret =
|
|
|
|
setsockopt(context->sock, SOL_SOCKET, SO_KEEPALIVE, (const void*)&enabled, sizeof(enabled)) ||
|
|
|
|
setsockopt(context->sock, SOL_SOCKET, SO_KEEPALIVE, (const void*)&enabled, sizeof(enabled)) ||
|
|
|
|
|
|
|
|
#ifndef __APPLE__
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPIDLE, (const void*)&idle, sizeof(idle)) ||
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPIDLE, (const void*)&idle, sizeof(idle)) ||
|
|
|
|
|
|
|
|
#endif
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPINTVL, (const void*)&interval, sizeof(interval)) ||
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPINTVL, (const void*)&interval, sizeof(interval)) ||
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPCNT, (const void*)&counter, sizeof(counter));
|
|
|
|
setsockopt(context->sock, IPPROTO_TCP, TCP_KEEPCNT, (const void*)&counter, sizeof(counter));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|