-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blocking => false not working #826
Comments
@peixotorms I cannot replicate this. When using Can you provide more information or a piece of content that lets us replicate this? |
Hi, it's been over 3 months, so I don't remember the exact case, but If I remember correctly, when you call an external url that takes for example 10 seconds to complete the output, it was also slowing down the response on the calling script, regardless of the blocking settings. So script A calls script B with blocking = false, but script B needs 10 seconds to complete. Adding CURLOPT_NOSIGNAL when blocking = false, sorted it for me though. I'll test this again against the latest version soon, but not right now. Thanks |
@schlessera the problem is reproducible for me. It's apparent if you use an endpoint that takes longer to produce a response, like https://httpbin.org/delay/5:
The response is indeed empty, however the library is awaiting for it. |
@peixotorms @emohamed Thanks, I can indeed replicate this. Using |
Summary
When I set
blocking => false
, the request is still blocking.Given the following code sample
Unfortunately, if I set a short timeout like 1 second, the remote API call will not complete.
I don't need the response, only for it to run in the background while the script does something else.
I'd expect the following behaviour
I would expect it to return immediately, so the rest of the script can run.
Instead this happened
With a long API call lasting over 1 minute, the script hangs until it returns a reply.
Additional context
The way around this for non blocking requests is to use curl with
CURLOPT_NOSIGNAL
set to 1.This let's me timeout early and the api call will complete properly.
Your environment
Tested against
develop
branch?no
The text was updated successfully, but these errors were encountered: