]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: lua/applet: the cosocket applet should use appctx_wakeup in place of task_wakeup
authorThierry FOURNIER <tfournier@arpalert.org>
Sat, 26 Sep 2015 15:02:35 +0000 (17:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 27 Sep 2015 17:30:26 +0000 (19:30 +0200)
It seems that in the new applet system, the applet me be wakeup with the
function appctx_wakeup() in place of the function task_wakeup().

src/hlua.c

index c6f7d0b81f95513c42f895cc5a740f4dff12f943..c9cbca037b75d9f15918a442567d4ce83d7b0bbf 100644 (file)
@@ -2234,12 +2234,6 @@ __LJMP static int hlua_socket_connect(struct lua_State *L)
                }
        }
 
-       /* it is important not to call the wakeup function directly but to
-        * pass through task_wakeup(), because this one knows how to apply
-        * priorities to tasks.
-        */
-       task_wakeup(socket->s->task, TASK_WOKEN_INIT);
-
        hlua = hlua_gethlua(L);
        appctx = objt_appctx(socket->s->si[0].end);
 
@@ -2248,6 +2242,7 @@ __LJMP static int hlua_socket_connect(struct lua_State *L)
         */
        si_applet_cant_get(&socket->s->si[0]);
        si_applet_cant_put(&socket->s->si[0]);
+       appctx_wakeup(appctx);
 
        if (!hlua_com_new(hlua, &appctx->ctx.hlua.wake_on_write))
                WILL_LJMP(luaL_error(L, "out of memory"));