mirror of
https://github.com/unraid/webgui.git
synced 2026-01-06 09:39:58 -06:00
device_list: add timeout to force update
This commit is contained in:
@@ -17,8 +17,7 @@ $varroot = '/var/local/emhttp';
|
||||
$pool_log = '/var/tmp/pool_log.tmp';
|
||||
$smartALL = '/boot/config/smart-all.cfg';
|
||||
$smartONE = '/boot/config/smart-one.cfg';
|
||||
$md5_old = -1;
|
||||
$fs_old = -1;
|
||||
$md5_old = $fs_old = $timeout = -1;
|
||||
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
require_once "$docroot/webGui/include/publish.php";
|
||||
@@ -531,9 +530,11 @@ while (true) {
|
||||
|
||||
$echo = json_encode($echo);
|
||||
$md5_new = md5($echo,true);
|
||||
if ($md5_new !== $md5_old) {
|
||||
$timeout++;
|
||||
if ($md5_new !== $md5_old || $timeout >= 15) {
|
||||
publish('devices', $echo);
|
||||
$md5_old = $md5_new;
|
||||
$timeout = -1;
|
||||
}
|
||||
$fs_new = _var($var,'fsState')=='Started' ? 1 : 0;
|
||||
if ($fs_new !== $fs_old) {
|
||||
|
||||
Reference in New Issue
Block a user