better error message

This commit is contained in:
Cloud Wu
2014-08-26 11:30:07 +08:00
parent bfb8bcb86e
commit 0fde2ea571

View File

@@ -32,7 +32,7 @@ local function read_package(fd)
local sz = socket.read(fd, 1)
assert(sz, "closed")
sz = string.byte(sz)
local content = socket.read(fd, sz)
local content = assert(socket.read(fd, sz), "closed")
return skynet.unpack(content)
end