diff options
| author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-02-22 13:14:02 +0100 | 
|---|---|---|
| committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-02-22 13:14:02 +0100 | 
| commit | 3bb217a02158614ec6ab625b88a82471ea507f2e (patch) | |
| tree | 3581c9b1c9529f424947465373ff4212aea54d28 /src/tools/oping | |
| parent | c50f6c28cb7f97e5a919e696ffb096001a68664a (diff) | |
| download | ouroboros-3bb217a02158614ec6ab625b88a82471ea507f2e.tar.gz ouroboros-3bb217a02158614ec6ab625b88a82471ea507f2e.zip | |
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.
Diffstat (limited to 'src/tools/oping')
| -rw-r--r-- | src/tools/oping/oping_server.c | 4 | 
1 files changed, 1 insertions, 3 deletions
| 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); -                        }                  }          } | 
