diff options
author | doktornotor <notordoktor@gmail.com> | 2015-11-19 00:43:42 +0100 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-11-19 00:43:42 +0100 |
commit | e2bec49391838f89ce83fafd0c6f2f56607842a9 (patch) | |
tree | 8288a0e35475c67175d119dbbdae58ba9f42eab8 /config/lightsquid/sqstat.class.php | |
parent | ead8f184163699bac2cece2113fb2469e0ed5b85 (diff) | |
download | pfsense-packages-e2bec49391838f89ce83fafd0c6f2f56607842a9.tar.gz pfsense-packages-e2bec49391838f89ce83fafd0c6f2f56607842a9.tar.bz2 pfsense-packages-e2bec49391838f89ce83fafd0c6f2f56607842a9.zip |
Fix sqstat speed calculations
Diffstat (limited to 'config/lightsquid/sqstat.class.php')
-rw-r--r-- | config/lightsquid/sqstat.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/lightsquid/sqstat.class.php b/config/lightsquid/sqstat.class.php index 2f1dc9ba..a190557c 100644 --- a/config/lightsquid/sqstat.class.php +++ b/config/lightsquid/sqstat.class.php @@ -349,8 +349,9 @@ class squidstat { $is_time = time(); $curr_speed = 0; $avg_speed = 0; - if (isset($session_data[$con_id]) && $con_data == $session_data[$con_id]) { + if (isset($session_data[$con_id]) && !empty($session_data[$con_id])) { // if we have info about current connection, we do analyze its data current speed + $con_data = $session_data[$con_id]; $was_time = $con_data['time']; $was_size = $con_data['size']; if ($was_time && $was_size) { @@ -505,8 +506,9 @@ class squidstat { $con_id = $con['connection']; $is_time = time(); $curr_speed = $avg_speed = 0; - if (isset($session_data[$con_id]) && $con_data == $session_data[$con_id]) { + if (isset($session_data[$con_id]) && !empty($session_data[$con_id])) { // if we have info about current connection, we do analyze its data current speed + $con_data = $session_data[$con_id]; $was_time = $con_data['time']; $was_size = $con_data['size']; if ($was_time && $was_size) { |