View Single Post
Posts: 16 | Thanked: 14 times | Joined on Aug 2012 @ Germany
#829
OK, my post above was for users. Now, i'll try to explain the problem to developers (in my really bad english).

Harmattan, per default, is IPv6 ready. BUT! If you are behind an IPv6 enabled router, the routers DNS-Server (or any other DNS-Server) may return an IPv6 address for a host. getaddrinfo() possibly returns an ipv6 address to your programm and you are trying to connect() to this address. This naturally does not work when there isn't a working ipv6 route to this host. The connection times out and the user is unhappy. With good reason...

What to do?
  • Do not connect only to the first returned address. After a connection timeout, try to connect to the other returned addresses (if any) as well.
  • Use asynchronous connects to minimize timeouts.
  • Cache your findings!
  • Print a message about your findings
  • Give an option to work around this issue