mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-02 17:41:47 +00:00
BUG/MINOR, BUG/MINOR: lua: Put tasks to sleep when waiting for data
If a lua socket is waiting for data it currently spins at 100% cpu usage. This because the TICK_ETERNITY returned by the socket is ignored when setting the 'expire' time of the task. Fixed by removing the check for yields that return TICK_ETERNITY. This should be backported to at least 1.8.
This commit is contained in:
parent
148b16e1ce
commit
fe971b35ae
@ -5552,7 +5552,6 @@ static struct task *hlua_process_task(struct task *task)
|
|||||||
|
|
||||||
case HLUA_E_AGAIN: /* co process or timeout wake me later. */
|
case HLUA_E_AGAIN: /* co process or timeout wake me later. */
|
||||||
notification_gc(&hlua->com);
|
notification_gc(&hlua->com);
|
||||||
if (hlua->wake_time != TICK_ETERNITY)
|
|
||||||
task->expire = hlua->wake_time;
|
task->expire = hlua->wake_time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user