mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
socket.write return nil when write to a closed fd
This commit is contained in:
@@ -218,7 +218,11 @@ function socket.readline(fd, sep)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function socket.write(fd, msg, sz)
|
function socket.write(fd, msg, sz)
|
||||||
|
if CLOSED[fd] or not READBUF[fd] then
|
||||||
|
return
|
||||||
|
end
|
||||||
skynet.send(".socket", "client", fd, msg, sz)
|
skynet.send(".socket", "client", fd, msg, sz)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function socket.lock(fd)
|
function socket.lock(fd)
|
||||||
|
|||||||
Reference in New Issue
Block a user