From e768ba4603d898df86bf87a0eeb260fb5db91567 Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 20 Jun 2017 20:27:12 +0200 Subject: [PATCH] Small optimization in network check for plugins --- plugins/dynamix.plugin.manager/include/PluginHelpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix.plugin.manager/include/PluginHelpers.php b/plugins/dynamix.plugin.manager/include/PluginHelpers.php index 3ff9098d2..16fad2fd5 100644 --- a/plugins/dynamix.plugin.manager/include/PluginHelpers.php +++ b/plugins/dynamix.plugin.manager/include/PluginHelpers.php @@ -26,7 +26,7 @@ function check_plugin($arg, $google='8.8.8.8') { while (1) { if (exec("ping -qnc1 $google|awk '/received/{print $4}'")==1) break; $inet--; - if ($inet) sleep(1); else break; + if (!$inet) break; } return $inet ? plugin('check',$arg) : false; }