]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: connection: Don't bother reactivating polling after connection retry.
authorOlivier Houchard <cognet@ci0.org>
Tue, 20 Nov 2018 23:16:45 +0000 (00:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Nov 2018 18:50:39 +0000 (19:50 +0100)
As we now will no longer try tro subscribe to recv/send events before the
connection is established, there's no need to reactivate polling on the fd
when retrying connection. It will be activated later on subscribe.

src/stream.c

index 96e7f886541973d53945ef88cb8870d82b830047..e73d9a163e4dec28f53427d0b832ab83fe7a3795 100644 (file)
@@ -918,22 +918,11 @@ static void sess_update_stream_int(struct stream *s)
                srv = objt_server(s->target);
 
                if (conn_err == SF_ERR_NONE) {
-                       struct connection *conn;
-
-                       conn = cs_conn(objt_cs(si->end));
                        /* state = SI_ST_CON or SI_ST_EST now */
                        if (srv)
                                srv_inc_sess_ctr(srv);
                        if (srv)
                                srv_set_sess_last(srv);
-                       /* If we're retrying to connect to the server, and
-                        * somebody subscribed to recv or send events, we have
-                        * to make sure the polling is active on the new fd.
-                        */
-                       if (conn->send_wait)
-                               conn_xprt_want_send(conn);
-                       if (conn->recv_wait)
-                               conn_xprt_want_recv(conn);
                        return;
                }