bugfix: socket read

This commit is contained in:
云风
2013-06-24 12:11:00 +08:00
parent 682f5c0eb6
commit f51e043dd6
2 changed files with 18 additions and 2 deletions

View File

@@ -33,7 +33,8 @@ skynet.register_protocol {
buf,bsz = buffer.push(buf, msg, sz)
end
READBUF[fd] = buf
if qsz == nil then
local session = READSESSION[fd]
if qsz == nil or session == nil then
return
end
if type(qsz) == "number" then
@@ -47,7 +48,8 @@ skynet.register_protocol {
end
end
response(READSESSION[fd])
response(session)
READSESSION[fd] = nil
end
}