diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 0649873a9f6..e48cdb07ca9 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -417,7 +417,6 @@ struct open_socket_out_state { struct sockaddr_storage ss; socklen_t salen; uint16_t port; - int wait_usec; struct tevent_req *connect_subreq; }; @@ -471,7 +470,6 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx, state->ev = ev; state->ss = *pss; state->port = port; - state->wait_usec = 10000; state->salen = -1; state->fd = socket(state->ss.ss_family, SOCK_STREAM, 0); @@ -522,12 +520,6 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX *mem_ctx, if (tevent_req_nomem(state->connect_subreq, NULL)) { return tevent_req_post(req, ev); } - if (!tevent_req_set_endtime( - state->connect_subreq, state->ev, - timeval_current_ofs(0, state->wait_usec))) { - tevent_req_oom(req); - return tevent_req_post(req, ev); - } tevent_req_set_callback(state->connect_subreq, open_socket_out_connected, req); return req; @@ -550,46 +542,6 @@ static void open_socket_out_connected(struct tevent_req *subreq) return; } - if ( -#ifdef ETIMEDOUT - (sys_errno == ETIMEDOUT) || -#endif - (sys_errno == EINPROGRESS) || - (sys_errno == EALREADY) || - (sys_errno == EAGAIN)) { - - /* - * retry - */ - - if (state->wait_usec < 250000) { - state->wait_usec *= 1.5; - } - - subreq = async_connect_send(state, state->ev, state->fd, - (struct sockaddr *)&state->ss, - state->salen, NULL, NULL, NULL); - if (tevent_req_nomem(subreq, req)) { - return; - } - if (!tevent_req_set_endtime( - subreq, state->ev, - timeval_current_ofs_usec(state->wait_usec))) { - return; - } - state->connect_subreq = subreq; - tevent_req_set_callback(subreq, open_socket_out_connected, req); - return; - } - -#ifdef EISCONN - if (sys_errno == EISCONN) { - tevent_req_done(req); - return; - } -#endif - - /* real error */ tevent_req_nterror(req, map_nt_error_from_unix(sys_errno)); }