Add global error handling

This commit is contained in:
2023-01-09 00:28:12 +01:00
parent 7f7a07c4d2
commit c36ad8c113
13 changed files with 181 additions and 105 deletions

View File

@ -227,7 +227,7 @@ int http_receive_request(sock *client, http_req *req) {
rcv_len = sock_recv(client, buf, CLIENT_MAX_HEADER_SIZE - 1, MSG_PEEK);
if (rcv_len <= 0) {
error("Unable to receive http header: %s", sock_strerror(client));
error("Unable to receive http header");
return -1;
}
buf[rcv_len] = 0;