Hello,
Thanks for a great Lua API!
I have a question regarding the socket:settimeout function.
It appears to only accept an integer value for seconds, but internally
converts to milliseconds (see below).
Is there a reason to enforce whole seconds, or could this be relaxed to
accept a lua number (float/double).?
Happy to provide a patch, but just checking first since I'm new to HAProxy.
Thanks for your time,
regards
nickg
around line 2442 in hluc.c:
__LJMP static int hlua_socket_settimeout(struct lua_State *L)
{
struct hlua_socket *socket;
int tmout;
struct xref *peer;
struct appctx *appctx;
struct stream_interface *si;
struct stream *s;
MAY_LJMP(check_args(L, 2, "settimeout"));
socket = MAY_LJMP(hlua_checksocket(L, 1));
tmout = MAY_LJMP(luaL_checkinteger(L, 2)) * 1000;