summaryrefslogtreecommitdiffstats
path: root/src/vcl/sock_test_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/sock_test_server.c')
-rw-r--r--src/vcl/sock_test_server.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vcl/sock_test_server.c b/src/vcl/sock_test_server.c
index fbfe66684cb..354b9900d10 100644
--- a/src/vcl/sock_test_server.c
+++ b/src/vcl/sock_test_server.c
@@ -653,7 +653,14 @@ main (int argc, char **argv)
errno_val);
return rv;
}
- fcntl (ssm->listen_fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (ssm->listen_fd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ errno_val = errno;
+ perror ("ERROR in main()");
+ fprintf (stderr, "SERVER: ERROR: fcntl failed (errno = %d)!\n",
+ errno_val);
+ return rv;
+ }
#ifdef VCL_TEST
rv = vppcom_session_listen (ssm->listen_fd, 10);