Browse Source

Updated “ckrl()” to the “lib” version

pezcurrel 2 tuần trước cách đây
mục cha
commit
20ff553d5c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      web/clitools/getinstinfo.php

+ 1 - 1
web/clitools/getinstinfo.php

@@ -1206,7 +1206,7 @@ function ckrl($headers,$ctx) {
 	$res=ckratelimit($headers);
 	if (!$res['ok']) {
 		eecho(2,"{$ctx}: ckratelimit: {$res['error']}.\n");
-	} elseif ($res['sleep']>0) {
+	} elseif ($res['remaining']==0) {
 		eecho(2,"{$ctx}: ckratelimit: x-ratelimit-remaining is 0, sleeping for ".ght($res['sleep']).' (until '.date('c',time()+$res['sleep']).") ...\n");
 		sleep($res['sleep']);
 	}