curl-library
Using curl_multi some requests get ignored after connection succeeded
Date: Fri, 1 Sep 2017 17:29:47 +0200
Here is how it happens:
Use curl_multi integration using SOCKETFUNCTION and TIMERFUNCTION.
Create many easy handle requesting through HTTP onto an HTTP server at
once.
Have the backlog configuration through "listen" on the server be lower
than the number requests.
Curl will create as many sockets as there are easy handles. And it will
request CURL_POLL_OUT for all of them. That is the way it know when it
is connected.
Only a fraction will get notified this CURL_CSELECT_OUT on the first
polls. The requests will go through.
At some point other sockets will start to connect and we notify curl.
But curl just asks to remove the socket from polling, and it never
sends the request.
I have made an example for Linux (epoll) that fails to complete on cURL
7.55.0 and 7.55.1, but succeeds in 7.54.1, though sometimes it can get
a bit slow.
-- Valentin David This email reflects my own opinion. You have the right to disagree.
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
- text/x-python attachment: test_server.py
- text/x-c++src attachment: multi.cpp