Write an empty response to clients
This commit is contained in:
parent
1a13289da9
commit
fa0dbed44c
13
main.c
13
main.c
@ -142,8 +142,17 @@ int main(int argc, char *argv[])
|
||||
goto close_client_socket;
|
||||
}
|
||||
|
||||
sbuf[slen] = '\0';
|
||||
printf("Received selector: \"%s\"\n", sbuf);
|
||||
/*
|
||||
* Write an empty response to the client.
|
||||
*/
|
||||
do {
|
||||
errno = 0;
|
||||
n = write(cfd, ".\r\n", 3);
|
||||
} while (errno == EINTR);
|
||||
if (n == -1) {
|
||||
fprintf(stderr, "Error sending response to client\n");
|
||||
goto close_client_socket;
|
||||
}
|
||||
|
||||
close_client_socket:
|
||||
close(cfd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user