mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 17:37:43 +00:00
relay.enableTcpKeepalive config option. default = false
This commit is contained in:
@ -82,7 +82,7 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
||||
ws->setUserData((void*)c);
|
||||
connIdToConnection.emplace(connId, c);
|
||||
|
||||
{
|
||||
if (cfg().relay__enableTcpKeepalive) {
|
||||
int optval = 1;
|
||||
if (setsockopt(ws->getFd(), SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval))) {
|
||||
LW << "Failed to enable TCP keepalive: " << strerror(errno);
|
||||
|
Reference in New Issue
Block a user