mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +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
|
||||
|
||||
function socket.write(fd, msg, sz)
|
||||
if CLOSED[fd] or not READBUF[fd] then
|
||||
return
|
||||
end
|
||||
skynet.send(".socket", "client", fd, msg, sz)
|
||||
return true
|
||||
end
|
||||
|
||||
function socket.lock(fd)
|
||||
|
||||
Reference in New Issue
Block a user