THRIFT-5260 Fix the thrift compiler generate problematic lua code for the oneway method
Client: lua
Patch: longzhiri <persistentsnail@gmail.com>
This closes #2212
The oneway method's processor has no need to write the result to client, but it is necessary to return values of each handler's return.
diff --git a/test/lua/test_basic_server.lua b/test/lua/test_basic_server.lua
index acd2d79..20ac407 100644
--- a/test/lua/test_basic_server.lua
+++ b/test/lua/test_basic_server.lua
@@ -66,6 +66,10 @@
return thing
end
+function TestHandler:testOneway(secondsToSleep)
+ print("testOneway secondsToSleep:", secondsToSleep)
+end
+
--------------------------------------------------------------------------------
-- Test
local server
@@ -132,6 +136,7 @@
protocolFactory = prot_factory
}
assert(server, 'Failed to create server')
+ server:setExceptionHandler(function (err) error(err) end)
-- Serve
server:serve()