diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-03-15 21:14:41 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-03-16 12:05:40 +0100 |
commit | 4e775400564cc02b51978dc2671c126ff8da5e9d (patch) | |
tree | da32085328ab436bfc74ce11b7cde17e745e2c84 /src/tools/oping/oping_server.c | |
parent | 7602d165397aae3fc83e3a7b1efe1c0df2044572 (diff) | |
download | ouroboros-4e775400564cc02b51978dc2671c126ff8da5e9d.tar.gz ouroboros-4e775400564cc02b51978dc2671c126ff8da5e9d.zip |
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 <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/oping/oping_server.c')
-rw-r--r-- | src/tools/oping/oping_server.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |