]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: lua: allow socket api settimeout to accept integers, float, and doubles
authorMark Lakes <mlakes@signalsciences.com>
Tue, 27 Mar 2018 07:48:06 +0000 (09:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Mar 2018 12:17:02 +0000 (14:17 +0200)
commit56cc12509cf8b266a39131e0fa7b2dbbc48ce63e
tree19393248d80201e55296a48a35dc1194fbcaa88c
parent7741c854cd908dd4947325c36a6feb8203748d16
MINOR: lua: allow socket api settimeout to accept integers, float, and doubles

Instead of hlua_socket_settimeout() accepting only integers, allow user
to specify float and double as well. Convert to milliseconds much like
cli_parse_set_timeout but also sanity check the value.

http://w3.impa.br/~diego/software/luasocket/tcp.html#settimeout

T. Fournier edit:

The main goal is to keep compatibility with the LuaSocket API. This
API only accept seconds, so using a float to specify milliseconds is
an acceptable way.

Update doc.
doc/lua-api/index.rst
src/hlua.c