diff --git a/README.md b/README.md index 5cba3e7..9e1feb4 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,10 @@ And then open the `docs/html/index.html`. ## Future - Custom web pages (404) -- IPv6 compatible -- Multithreading to handle concurrent requests -- Logging -- Compression (Gzip) +- Logging to file - Reverse proxy +- IPv6 compatible +- Compression (Gzip) - PHP-FPM ## Performance diff --git a/src/core/worker.c b/src/core/worker.c index 61d829a..cfd24b7 100644 --- a/src/core/worker.c +++ b/src/core/worker.c @@ -35,7 +35,7 @@ static int cws_server_handle_client_data(int epfd, int client_fd) { return CWS_SERVER_OK; } - if (total_bytes <= 0) { + if (total_bytes < 0) { /* Something happened, close connection */ string_free(data); cws_server_close_client(epfd, client_fd); @@ -54,7 +54,7 @@ static int cws_server_handle_client_data(int epfd, int client_fd) { cws_http_send_response(request, HTTP_OK); cws_http_free(request); - cws_server_close_client(epfd, client_fd); + // cws_server_close_client(epfd, client_fd); return CWS_SERVER_OK; }