File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,15 +92,18 @@ public function bootHasRateLimits(PendingRequest $pendingRequest): void
9292 // place. We should make sure to throw the exception here.
9393
9494 if (isset ($ limitThatWasExceeded )) {
95- if (! $ limit ->getShouldSleep ()) {
95+ if (! $ limitThatWasExceeded ->getShouldSleep ()) {
9696 $ this ->throwLimitException ($ limitThatWasExceeded );
9797 }
9898
9999 // When the limit has been instructed to sleep() we will make the request
100100 // again, which will trigger the request middleware to sleep, and then
101101 // hopefully get a successful response afterward.
102+ //
103+ // Always delegate to the connector: send() exists on Connector but not on Request
104+ // (see saloonphp/saloon#532).
102105
103- return $ this ->send ($ response ->getRequest ());
106+ return $ response -> getConnector () ->send ($ response ->getRequest ());
104107 }
105108
106109 return $ response ;
You can’t perform that action at this time.
0 commit comments