curl-library
re-connect attempts with multiple A/AAAA recs
Date: Sat, 28 Jun 2008 14:55:44 +0200
Hello,
I've hit another problem.
I have a domain name that has both an AAAA and an A record, but the tricky
thing is that FTP is available only via IPv4.
Now I'm doing all the socket monitoring myself via Linux epoll() and CURL
calls my callback function to add/mod/remove sockets from the set.
As you can see in the log, CURL tries IPv6, adds a socket into the set, my
loop receives a failure and CURL then tries IPv4.
CurlPoller::addTransfer 0x98b0b0
No events
CURL debug: "About to connect() to dolezel.info port 21 (#0)"
CURL debug: "Trying 2002:515b:54e3::1..."
CurlPoller::socket_callback - add/mod
Events: CURL_CSELECT_ERR
CURL debug: "Connection refused"
CURL debug: "Trying 81.91.84.227..."
No events
No events
There comes the problem. It never tells me about the new IPv4 socket (but
according to Wireshark it really does connect).
It either reuses the socket used for IPv6 (and the fault is mine, there would
be something broken in my poller) or it creates a new one, but doesn't notify
me.
I think you can use the same demonstration program I sent for the SFTP problem
a few days ago. If you had time to find the bug or anything, I would be
really grateful. I can look into CURL's source code too, but I guess it would
take really long for me to locate the problem and fix it :-(
Thanks a lot!
-- Luboš DoleželReceived on 2008-06-28