From 3bb217a02158614ec6ab625b88a82471ea507f2e Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 22 Feb 2017 13:14:02 +0100 Subject: tools: Continue oping server after failed write When hammering the oping thread, it will have write fails when the buffer gets full as its flow is non-blocking. It would stop and deallocate the flow, but should just continue. --- src/tools/oping/oping_server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/tools') diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c index d7294fa1..24cd9bf1 100644 --- a/src/tools/oping/oping_server.c +++ b/src/tools/oping/oping_server.c @@ -100,10 +100,8 @@ void * server_thread(void *o) msg->type = htonl(ECHO_REPLY); - if (flow_write(fd, buf, msg_len) < 0) { + if (flow_write(fd, buf, msg_len) < 0) printf("Error writing to flow (fd %d).\n", fd); - flow_dealloc(fd); - } } } -- cgit v1.2.3