From 1091c377b53867a33c7f61d5fe341838f77fb18d Mon Sep 17 00:00:00 2001 From: c vw Date: Thu, 6 Aug 2020 18:22:49 +0200 Subject: [PATCH] Re-worked TCP setup a little bit, tried KEEPALIVE --- rigctl.c | 58 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/rigctl.c b/rigctl.c index e61b530..d935d59 100644 --- a/rigctl.c +++ b/rigctl.c @@ -586,6 +586,7 @@ static gpointer rigctl_server(gpointer data) { setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); setsockopt(server_socket, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)); + setsockopt(server_socket, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)); // bind to listening port memset(&server_address,0,sizeof(server_address)); @@ -601,45 +602,46 @@ static gpointer rigctl_server(gpointer data) { for(i=0;i