We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3c4498b + 10d0cf8 commit 0d7f416Copy full SHA for 0d7f416
1 file changed
lib/Tmdb/HttpClient/Adapter/GuzzleAdapter.php
@@ -62,6 +62,12 @@ public function registerSubscribers(EventDispatcherInterface $eventDispatcher)
62
// Adding 20% of the waiting time as it seems to be the best result without getting two blocking reqs.
63
$sleep = (int) $event->getResponse()->getHeader('retry-after') * 1.2;
64
65
+ /**
66
+ * @see https://github.com/php-tmdb/api/issues/154
67
+ * Maybe it's even better to set it to $number value
68
+ */
69
+ if (0 === $sleep && $number) $sleep = 1;
70
+
71
if ($sleep >= 0) {
72
return $sleep * 1000;
73
}
0 commit comments