cli_error(cptr) = ev_data(ev);
if (s_state(&(con_socket(con))) == SS_CONNECTING) {
completed_connection(cptr);
+ /* for some reason, the os_get_sockerr() in completed_connect()
+ * can return 0 even when ev_data(ev) indicates a real error, so
+ * re-assign the client error here.
+ */
+ cli_error(cptr) = ev_data(ev);
break;
}
/*FALLTHROUGH*/