|
@@ -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']);
|
|
|
}
|