Hi Willy and Sachin,
Le 14/08/2018 à 01:27, Cyril Bonté a écrit :
Thanks for the feedback. I've made some tests with the lines of code
you suggested and it looks to work fine. I'll prepare the patches tomorrow.
OK, some updates on the patch.
It was working well with haproxy 1.7, the same with haproxy 1.8.
But when I prepared the patch for the 1.9 branch, I discovered a strange
behaviour, where the timeout was approximaterly delayed by 500ms. I
spent some time tonight, until I discovered it was under my eyes some
lines earlier :)
The culprit is commit #56cc12509 [1] where the rounding calculation is
wrong :
/* round up for inputs that are fractions and convert to millis */
dtmout = (0.5 + MAY_LJMP(luaL_checknumber(L, 2))) * 1000;
Well, now it's identified, I'll (really) send the patch tomorrow and
will see in another patch how we can fix #56cc12509.
[1]
http://git.haproxy.org/?p=haproxy.git;a=blobdiff;f=src/hlua.c;h=60cf8f948437677b72adabc50602ca99d80349bf;hp=633841c6d7aecce3e5cf893e01b5eed1cfe64e0f;hb=56cc12509;hpb=7741c854cd908dd4947325c36a6feb8203748d16
--
Cyril Bonté