about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-07-24 17:23:57 -0400
committerJune McEnroe <june@causal.agency>2018-07-24 17:23:57 -0400
commita609ab7e471d7ba7598e2e2c913168a5e95b129b (patch)
tree35aa6b395e96e3a888d8b8e7b6177c624e938e4a
parentPrint time_t with %jd in meta (diff)
downloadtorus-a609ab7e471d7ba7598e2e2c913168a5e95b129b.tar.gz
torus-a609ab7e471d7ba7598e2e2c913168a5e95b129b.zip
Revert "Do not set non-blocking on client sockets"
This reverts commit f4da47cb0ee659472b563b9e6443663c62a69996.

There actually are adverse effects.
-rw-r--r--server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.c b/server.c
index f34c802..89ba03c 100644
--- a/server.c
+++ b/server.c
@@ -350,6 +350,7 @@ int main() {
 		if (!event.udata) {
 			int fd = accept(server, NULL, NULL);
 			if (fd < 0) err(EX_IOERR, "accept");
+			fcntl(fd, F_SETFL, O_NONBLOCK);
 
 			int on = 1;
 			error = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));