node-libcurl
node-libcurl copied to clipboard
curly: fails to add a request in the same event loop
Nothing special (curly + streaming response):
- request A -> request B fails with "Could not add easy handle to the multi handle"
- request A -> setImmediate(request B) succeeds
hi @kapouer, thanks for reporting this.
What is the Node.js version? If you could provide a Dockerfile / .js file that reproduces the issue that would be great.
Node 12.22.9 on debian/bookworm, with node-libcurl compiled against libcurl4-gnutls-dev 7.81.0. I'll try to isolate the problem.
Hi, using [email protected] in the same context, I get the same error.
Now my code looks like
await new Promise(resolve => setImmediate(resolve)); // without which it fails
const {
headers: hlist,
data,
statusCode
} = await curly[method](urlObj.href, opts);
However that error had disappeared for some time, and now it's back :( Something has changed - maybe I switched from prebuilt version to --build-from-source.
Of couse, reinstalling to 2.x still gives the same error - so it's not a regression.
This is some sort of duplicate of https://github.com/JCMais/node-libcurl/issues/81 I had SSL_VERIFYPEER set to false, and reenabling it fixes the issue.
To keep the maintainability of this project, I am closing old tickets. If the issue continues with the latest version of node-libcurl, please feel free to create a new ticket.