Feedback from upstream. The first and second call is because of resolver routines. The 3. connection is the "libstrophe" connection.
When I understood well, the reason of the bugs was a wrong IPv6 configuration. After failed IPv6 connection, libstrophe didn't try IPv4 as fallback. Am I right? TIL: There are some information in RFC 6724 - Default Address Selection for Internet Protocol Version 6 (IPv6). -- Stefan