diff --git a/emhttp/plugins/dynamix/nchan/device_list b/emhttp/plugins/dynamix/nchan/device_list index 6b8e15444..5176f2f3f 100755 --- a/emhttp/plugins/dynamix/nchan/device_list +++ b/emhttp/plugins/dynamix/nchan/device_list @@ -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) {