summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proxy_network.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proxy_network.c b/proxy_network.c
index a8d8f60..1ec186d 100644
--- a/proxy_network.c
+++ b/proxy_network.c
@@ -885,6 +885,7 @@ static int _flush_pending_write(mcp_backend_t *be) {
// short circuit for common case.
sent -= io->iovbytes;
} else {
+ io->iovbytes -= sent;
for (int x = 0; x < io->iovcnt; x++) {
struct iovec *iov = &io->iov[x];
if (sent >= iov->iov_len) {