summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index 3cb262652..51140ee02 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -240,6 +240,7 @@ void SocketEngine::UpdateStats(size_t len_in, size_t len_out)
void SocketEngine::GetStats(float &kbitpersec_in, float &kbitpersec_out, float &kbitpersec_total)
{
+ UpdateStats(0, 0); /* Forces emptying of the values if its been more than a second */
float in_kbit = indata * 8;
float out_kbit = outdata * 8;
kbitpersec_total = ((in_kbit + out_kbit) / 1024);