lua-resty-socket icon indicating copy to clipboard operation
lua-resty-socket copied to clipboard

consider number type in the flatten function

Open tokers opened this issue 6 years ago • 1 comments

Hi, Thibault!

Thanks for your job! This Lua module is very useful.

I'm trying to cooperate this Lua module with lua-resty-redis, so that we can communicate with our Redis servers in these "non-yield" phases.

I find the internal function flatten doesn't handle the number type. In lua-resty-redis, parameters passed to sock:send might be a Lua table with kinds of data type like string, number. Even in the implementations of luasocket, it uses luaL_checklstring, which also can convert number to string.

So maybe we should consider the number type. What's your opinion?

tokers avatar Feb 13 '19 08:02 tokers

Hey there! Sorry I missed this... Yes, definitly, if you still are using this library, please feel free to send a PR!

thibaultcha avatar Aug 07 '20 19:08 thibaultcha