소스 검색

move this

Grant Limberg 1 년 전
부모
커밋
59b2f73541
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tcp-proxy/tcp-proxy.cpp

+ 1 - 1
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);