Commit fd9fb7d3 authored by Radostin Stoyanov's avatar Radostin Stoyanov Committed by Andrei Vagin

socket-tcp-skip-in-flight: Use set_nonblock

Signed-off-by: 's avatarRadostin Stoyanov <rstoyanov1@gmail.com>
parent 635db489
......@@ -30,7 +30,6 @@ int main(int argc, char **argv)
struct pollfd poll_set[1];
int port = 9990;
int fd_s, fd_c, fd;
int flags;
int ret;
test_init(argc, argv);
......@@ -39,9 +38,8 @@ int main(int argc, char **argv)
if (fd_s < 0)
return -1;
flags = fcntl(fd_s, F_GETFL, 0);
if (fcntl(fd_s, F_SETFL, flags | O_NONBLOCK)) {
pr_perror("Unable to set O_NONBLOCK");
if (set_nonblock(fd_s, true)) {
pr_perror("setting O_NONBLOCK failed");
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment