diff options
author | dormando <dormando@rydia.net> | 2023-01-12 12:15:23 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-01-12 13:50:55 -0800 |
commit | 6537cfe41ead9c81dd3e9c9f5d3929a050692cbd (patch) | |
tree | 021699f628b831dee45800ba913ec53ce88a8cf1 /proxy_lua.c | |
parent | 0e87c6dd86d8a50ddd56fbce445fb18e498e7f5f (diff) | |
download | memcached-6537cfe41ead9c81dd3e9c9f5d3929a050692cbd.tar.gz |
proxy: clean logic around lua yielding
We were duck typing the response code for a coroutine yield before. It
would also pile random logic for overriding IO's in certain cases. This
now makes everything explicit and more clear.
Diffstat (limited to 'proxy_lua.c')
-rw-r--r-- | proxy_lua.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy_lua.c b/proxy_lua.c index 8b1e4d8..91b0840 100644 --- a/proxy_lua.c +++ b/proxy_lua.c @@ -596,7 +596,8 @@ static int mcplib_pool_proxy_call(lua_State *L) { rq->be = mcplib_pool_proxy_call_helper(L, p, key, len); // now yield request, pool up. - return lua_yield(L, 2); + lua_pushinteger(L, MCP_YIELD_POOL); + return lua_yield(L, 3); } static int mcplib_tcp_keepalive(lua_State *L) { |