summaryrefslogtreecommitdiffstats
path: root/fnet
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2018-08-27 16:14:36 +0000
committerHåvard Pettersen <havardpe@oath.com>2018-08-27 16:14:36 +0000
commit8c943e0067c9d117c6cc1557f2bd2dc12a001431 (patch)
tree93cbd62001374ad389827c3b1f1d92f650baea17 /fnet
parentba1100ee847c6085a85cda1f264e7b699d85c407 (diff)
make sure we flush even if no new data needs writing
Diffstat (limited to 'fnet')
-rw-r--r--fnet/src/vespa/fnet/connection.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/fnet/src/vespa/fnet/connection.cpp b/fnet/src/vespa/fnet/connection.cpp
index fc51697c8ea..a5f0b427a23 100644
--- a/fnet/src/vespa/fnet/connection.cpp
+++ b/fnet/src/vespa/fnet/connection.cpp
@@ -390,8 +390,11 @@ FNET_Connection::Write(bool direct)
++my_write_work;
}
- while ((res > 0) && !broken) { // flush output pipeline
+ if ((res >= 0) && !broken) { // flush output pipeline
res = _socket->flush();
+ while (res > 0) {
+ res = _socket->flush();
+ }
}
if (writtenData > 0) {