X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fsock_test_client.c;h=78987974ee65e4c0da39c95c60e030aa869bdff4;hb=c227e4950d3bc791d2ec4a2131916f9b5c40f008;hp=75913d9deda2fcdb4b1ae36051849a36b072eeaf;hpb=1502fc303b7d98caafa67f182502771d76fba7f2;p=vpp.git diff --git a/src/vcl/sock_test_client.c b/src/vcl/sock_test_client.c index 75913d9deda..78987974ee6 100644 --- a/src/vcl/sock_test_client.c +++ b/src/vcl/sock_test_client.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifndef VCL_TEST #include #endif @@ -647,6 +648,14 @@ sock_test_connect_test_sockets (uint32_t num_test_sockets) errno_val); return tsock->fd; } + if (fcntl (tsock->fd, F_SETFL, O_NONBLOCK) < 0) + { + errno_val = errno; + perror ("ERROR in sock_test_connect_test_sockets()"); + fprintf (stderr, "CLIENT: ERROR: fcntl failed (errno = %d)!\n", + errno_val); + return -1; + } #ifdef VCL_TEST rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);