diff options
-rw-r--r-- | lib/supple/comms.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/supple/comms.lua b/lib/supple/comms.lua index ef44666..e72f8f1 100644 --- a/lib/supple/comms.lua +++ b/lib/supple/comms.lua @@ -38,7 +38,10 @@ local function send_msg(msg) end local function recv_msg() - local len = luxio.read(fd, 5) + local len, errno = luxio.read(fd, 5) + if type(len) ~= "string" then + error(luxio.strerror(errno)) + end if #len < 5 then error("Unable to read 5 byte length") end |