From bd1e3f5925eab2978b4c99ce3e5272b7295d0bc7 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sun, 11 Feb 2018 22:46:52 +0000 Subject: [PATCH] Enable protocol-level (TCP) keep-alives on the connected socket, for ~KenDB3. --- src/syncterm/conn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/syncterm/conn.c b/src/syncterm/conn.c index 0d9dd8f013..7d6e1364d2 100644 --- a/src/syncterm/conn.c +++ b/src/syncterm/conn.c @@ -537,6 +537,8 @@ connected: failcode=FAILURE_DISCONNECTED; goto connect_failed; } + int keepalives = TRUE; + setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void*)&keepalives, sizeof(keepalives)); uifc.pop(NULL); return(sock); -- GitLab