mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-21 02:17:26 +00:00
BUG/MINOR: lua: the function returns anything
The output of these function indicates that one element is pushed in the stack, but no element is set in the stack. Actually, if anyone read the value returned by this function, is gets "something" present in the stack. This patch is a complement of these one:119a5f10e4
The LuaSocket documentation tell anything about the returned value, but the effective code set an integer of value one.316a9455b9/src/timeout.c (L172)
Thanks to Tim for the bug report. This patch should be backported in all version from 1.6
This commit is contained in:
parent
f93f0935c9
commit
e9636f192a
@ -2497,6 +2497,7 @@ __LJMP static int hlua_socket_settimeout(struct lua_State *L)
|
||||
s->res.wto = tmout;
|
||||
xref_unlock(&socket->xref, peer);
|
||||
|
||||
lua_pushinteger(L, 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user