summaryrefslogtreecommitdiffhomepage
path: root/plop.c
diff options
context:
space:
mode:
Diffstat (limited to 'plop.c')
-rw-r--r--plop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plop.c b/plop.c
index ec7eb3d..1e34c99 100644
--- a/plop.c
+++ b/plop.c
@@ -195,6 +195,12 @@ int handle_server(lua_State * L, const int efd, const int server)
}
}
+ if (-1 == fcntl(client, F_SETFL, (fcntl(client, F_GETFL, 0) | O_NONBLOCK)))
+ {
+ close(client);
+ return 0; // TODO: Retriage this error at some point.
+ }
+
// TODO: Request is not the enitre state of the client. Make them distinct along with responses.
struct request * request = new_request(L);
if (NULL == request)