proto_connect_wait
if (proto_connect_wait(conn, res->hr_timeout) == -1) {
int proto_connect_wait(struct proto_conn *conn, int timeout);