ITS#9328 cldap: check for error on connected socket

libldap doesn't use a connected socket for UDP sessions, but 3rd
parties can, passed in with ldap_init_fd().
3 jobs for its9328 in 34 minutes and 45 seconds (queued for 1 second)