diff options
Diffstat (limited to 'luxio/mq.lua')
-rw-r--r-- | luxio/mq.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/luxio/mq.lua b/luxio/mq.lua index 4ba8c65..6e11f8d 100644 --- a/luxio/mq.lua +++ b/luxio/mq.lua @@ -101,8 +101,8 @@ local mq_mt = { end, __tostring = function(x) - return ("message queue: %s %s (%d)%s"):format( - x.rw_mode, x.path, x.desc, x.closed and " closed" or "") + return ("message queue: %s %s (%s)%s"):format( + x.rw_mode, x.path, tostring(x.desc), x.closed and " closed" or "") end, __gc = mq_meta_gc @@ -155,7 +155,7 @@ local function open(path, rw, mode) mq, errno = l.mq_open(path, rw_mode) end - if mq < 0 then + if type(mq) == "number" and mq == -1 then return err("mq_open", errno) end |