From 59b2f7354176f5a3b3a8c48f5e4be3cacb032d50 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 6 May 2024 19:31:02 -0700 Subject: [PATCH] move this --- tcp-proxy/tcp-proxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp-proxy/tcp-proxy.cpp b/tcp-proxy/tcp-proxy.cpp index 770ee02b..a659ccc4 100644 --- a/tcp-proxy/tcp-proxy.cpp +++ b/tcp-proxy/tcp-proxy.cpp @@ -271,8 +271,8 @@ struct TcpProxyService Client &c = *((Client *)*uptr); if (c.tcpWritePtr) { long n = phy->streamSend(sock,c.tcpWriteBuf,c.tcpWritePtr); - Metrics::tcp_bytes_out += n; if (n > 0) { + Metrics::tcp_bytes_out += n; memmove(c.tcpWriteBuf,c.tcpWriteBuf + n,c.tcpWritePtr -= (unsigned long)n); if (!c.tcpWritePtr) phy->setNotifyWritable(sock,false);