diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-15 06:01:16 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-15 06:01:16 +0000 |
commit | d6ad908cb5b6cf9b104f94f408b57d0320bf3eca (patch) | |
tree | f4e19e33422dc814806c17ecb8245f5ceff47d29 | |
parent | 61381bd912998fe7c78e561ec3ca0227f9ed0e40 (diff) | |
download | pfsense-d6ad908cb5b6cf9b104f94f408b57d0320bf3eca.zip pfsense-d6ad908cb5b6cf9b104f94f408b57d0320bf3eca.tar.gz |
Check for disconnected clients and exit
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 16 | ||||
-rw-r--r-- | usr/local/www/includes/sajax.class.php | 3 |
2 files changed, 7 insertions, 12 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 7202df8..f36bbff 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -1,9 +1,8 @@ <? -/* -*function cpu_usage() { -* return get_cpuusage(get_cputicks(), get_cputicks()); -*} -*/ + +if(Connection_Aborted()) { + exit; +} function get_uptime() { exec("/sbin/sysctl -n kern.boottime", $boottime); @@ -27,13 +26,6 @@ function get_uptime() { $uptimestr .= sprintf("%02d:%02d", $uphours, $upmins); return $uptimestr; } -/* -*function get_cputicks() { -* sleep(5); -* $cputicks = explode(" ", `/sbin/sysctl -n kern.cp_time`); -* return $cputicks; -*} -*/ function cpu_usage() { sleep(5); diff --git a/usr/local/www/includes/sajax.class.php b/usr/local/www/includes/sajax.class.php index 16df184..58e9393 100644 --- a/usr/local/www/includes/sajax.class.php +++ b/usr/local/www/includes/sajax.class.php @@ -1,5 +1,8 @@ <?php +if(Connection_Aborted()) { + exit; +} class sajax { |