Hi.
I was quickly going through the code and noticed that in file socket.lua in function function _M.receive(self) there on some lines return three parameters and on some lines just two.
If I am correct then this patch could be applied to fix it: patch.diff