Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.13.0
-
None
Description
The oneway method 'testOneway' in file 'test/ThriftTest.thrift', for instance, generated code in file 'test/lua/gen-lua/ThriftTest_ThriftTest.lua' as follows:
function ThriftTestProcessor:process_testOneway(seqid, iprot, oprot, server_ctx)
local args = testOneway_args:new{}
local reply_type = TMessageType.REPLY
args:read(iprot)
iprot:readMessageEnd()
local result = testOneway_result:new{}
local status, res = pcall(self.handler.testOneway, self.handler, args.secondsToSleep)
if not status then
reply_type = TMessageType.EXCEPTION
result = TApplicationException:new
else
result.success = res
end
oprot:writeMessageBegin('testOneway', reply_type, seqid)
result:write(oprot)
oprot:writeMessageEnd()
oprot.trans:flush()
end
The 'testOneway_result' is undefined and I think it is wrong to write the 'result' to the 'oprot' since it is nil, but at the same time it is necessary for every process functions to return values from each handler's return.
I have created a pull request here: https://github.com/apache/thrift/pull/2212
Attachments
Issue Links
- links to