mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
socket.open can return error
This commit is contained in:
@@ -96,7 +96,7 @@ function socket.open(addr, port)
|
||||
local cmd = "open" .. " " .. (port and (addr..":"..port) or addr)
|
||||
local r = skynet.call(".socket", "text", cmd)
|
||||
if r == "" then
|
||||
error(cmd .. " failed")
|
||||
return nil, cmd .. " failed"
|
||||
end
|
||||
local fd = tonumber(r)
|
||||
READBUF[fd] = true
|
||||
|
||||
Reference in New Issue
Block a user