]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: peers: fix applet scheduling
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Apr 2015 11:21:15 +0000 (13:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Apr 2015 11:21:15 +0000 (13:21 +0200)
Consecutive to the recent changes brought to applets, peers properly
connect but do not exchange data anymore because the stream interface
is not marked as waiting for data.

No backport is needed.

src/peers.c

index 26b3e6fde220cec01684a82df492df88d87fae6c..3dc3711e2996256a5349fdbc5b55883bbe5d1d97 100644 (file)
@@ -1143,6 +1143,10 @@ static struct stream *peer_session_create(struct peer *peer, struct peer_session
         */
        s->flags = SF_ASSIGNED|SF_ADDR_SET;
 
+       /* applet is waiting for data */
+       si_applet_cant_get(&s->si[0]);
+       appctx_wakeup(appctx);
+
        /* initiate an outgoing connection */
        si_set_state(&s->si[1], SI_ST_ASS);