summary refs log tree commit diff
path: root/local.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-18 14:44:19 -0400
committerJune McEnroe <june@causal.agency>2020-05-18 14:44:19 -0400
commit4f7066dada94a402d867ceca9a668a6e64d12f3c (patch)
tree9f9aa93653fad589a85d843e656ab428435cc08c /local.c
parentEnable TCP keepalive with half-hour idle (diff)
downloadpounce-4f7066dada94a402d867ceca9a668a6e64d12f3c.tar.gz
pounce-4f7066dada94a402d867ceca9a668a6e64d12f3c.zip
Don't bother setting SO_NOSIGPIPE
We need to ignore SIGPIPE anyway for other platforms.
Diffstat (limited to '')
-rw-r--r--local.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/local.c b/local.c
index 50e49d5..c4aea6f 100644
--- a/local.c
+++ b/local.c
@@ -215,11 +215,8 @@ struct tls *localAccept(int *fd, int bind) {
 		*fd = sent;
 	}
 
-	int yes = 1;
-	int error = setsockopt(*fd, SOL_SOCKET, SO_NOSIGPIPE, &yes, sizeof(yes));
-	if (error) err(EX_OSERR, "setsockopt");
-
-	error = setsockopt(*fd, SOL_SOCKET, SO_KEEPALIVE, &yes, sizeof(yes));
+	int on = 1;
+	int error = setsockopt(*fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
 	if (error) err(EX_OSERR, "setsockopt");
 
 	int idle = 15 * 60;