}
#endif
+ /*
+ * Don't call connect() if the socket is synchronous, it will block.
+ */
+ if (!my->info.cfg->async) return 0;
+
return fr_bio_fd_try_connect(my);
}
/** Opens a socket and updates sock->fd
*
- * Note that it does not call connect()!
+ * If the socket is asynchronous, it also calls connect()
*/
int fr_bio_fd_open(fr_bio_t *bio, fr_bio_fd_config_t const *cfg)
{
if (rcode < 0) goto fail;
}
-
switch (my->info.socket.af) {
case AF_LOCAL:
if (fr_bio_fd_socket_bind_unix(my, cfg) < 0) goto fail;