https://bugs.openldap.org/show_bug.cgi?id=9244
--- Comment #1 from Howard Chu hyc@openldap.org --- (In reply to Ryan Tandy from comment #0)
Created attachment 721 [details] async connect test without TLS
My understanding of LDAP_OPT_CONNECT_ASYNC is that the attached program should not block. If the connection does not establish fast enough, the bind call is supposed to return LDAP_X_CONNECTING.
The Bind should not block for longer than the connect timeout.
I also notice that LDAP_OPT_CONNECT_ASYNC is not effective unless LDAP_OPT_NETWORK_TIMEOUT is also set. It might be intentional, but the man page doesn't mention this specifically, and I don't see why it would be necessary...
That is the design. If you don't specify a connect timeout, then it doesn't know how long to wait for in that polling loop.