From 4e775400564cc02b51978dc2671c126ff8da5e9d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 15 Mar 2018 21:14:41 +0100 Subject: tools: Use non-blocking read in servers The oping and ocbr servers were using non-blocking read/writes. This caused writes to fail on high-performance tests if the buffer got full, instead of waiting for a slot in the buffer. The write failure caused the server to quit. This fixes the tools by setting the I/O to blocking write and non-blocking read. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/tools/oping/oping_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/oping') diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c index e91b6f10..391da197 100644 --- a/src/tools/oping/oping_server.c +++ b/src/tools/oping/oping_server.c @@ -142,7 +142,7 @@ void * accept_thread(void * o) server.times[fd] = now; pthread_mutex_unlock(&server.lock); - fccntl(fd, FLOWSFLAGS, FLOWFNONBLOCK | FLOWFRDWR); + fccntl(fd, FLOWSFLAGS, FLOWFRNOBLOCK | FLOWFRDWR); } return (void *) 0; -- cgit v1.2.3