]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lua: fix wakeup condition from sleep()
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Sep 2021 14:12:31 +0000 (16:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Sep 2021 14:26:51 +0000 (16:26 +0200)
commit12c02701d304f29ca74f521cfcc5fe1bc6f3e03d
tree6a0902624d294dd927fb07fb6c2c93ef5b65e9d8
parent8d264387c3b44268a1cf64b9e6aef8177257f24d
BUG/MEDIUM: lua: fix wakeup condition from sleep()

A time comparison was wrong in hlua_sleep_yield(), making the sleep()
code do nothing for periods of 24 days every 49 days. An arithmetic
comparison was performed on now_ms instead of using tick_is_expired().

This bug was added in 1.6-dev by commit 5b8608f1e ("MINOR: lua: core:
add sleep functions") so the fix should be backported to all stable
versions.
src/hlua.c