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
This commit is contained in:
cflakes
2010-05-22 10:32:59 +00:00
parent 01453c533b
commit 779401307e

View File

@@ -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);