Skip to content

Commit

Permalink
error exit if O_NONBLOCK fails, as cli would probably not work
Browse files Browse the repository at this point in the history
  • Loading branch information
deweerdt authored and kazuho committed Nov 2, 2024
1 parent 9b88159 commit 787bfd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ static int handle_connection(int sockfd, ptls_context_t *ctx, const char *server
ptls_buffer_init(&encbuf, "", 0);
ptls_buffer_init(&ptbuf, "", 0);

fcntl(sockfd, F_SETFL, O_NONBLOCK);
if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) {
perror("fcntl");
goto Exit;
}

if (input_file == input_file_is_benchmark) {
if (!ptls_is_server(tls))
Expand Down

0 comments on commit 787bfd9

Please sign in to comment.