From 779401307ebac930f7d00d66709a4bb70063cdb3 Mon Sep 17 00:00:00 2001 From: cflakes Date: Sat, 22 May 2010 10:32:59 +0000 Subject: [PATCH] Fixed web mod traffic being counted twice. Issue identified by psychon. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2003 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WebModules.cpp b/WebModules.cpp index 075d4eef..7a9a0f48 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -143,6 +143,10 @@ CWebSock::~CWebSock() { CZNC::Get().AddBytesRead(GetBytesRead()); } + // bytes have been accounted for, so make sure they don't get again: + ResetBytesWritten(); + ResetBytesRead(); + // If the module IsFake() then it was created as a dummy and needs to be deleted if (m_pModule && m_pModule->IsFake()) { m_pModule->UnlinkSocket(this);